first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# Cron tasks manager
## About
Manage all your automated web tasks from a single interface.
## Contributing
PrestaShop modules are open-source extensions to the PrestaShop e-commerce solution. Everyone is welcome and even encouraged to contribute with their own improvements.
### Requirements
Contributors **must** follow the following rules:
* **Make your Pull Request on the "dev" branch**, NOT the "master" branch.
* Do not update the module's version number.
* Follow [the coding standards][1].
### Process in details
Contributors wishing to edit a module's files should follow the following process:
1. Create your GitHub account, if you do not have one already.
2. Fork the cronjobs project to your GitHub account.
3. Clone your fork to your local machine in the ```/modules``` directory of your PrestaShop installation.
4. Create a branch in your local clone of the module for your changes.
5. Change the files in your branch. Be sure to follow [the coding standards][1]!
6. Push your changed branch to your fork in your GitHub account.
7. Create a pull request for your changes **on the _'dev'_ branch** of the module's project. Be sure to follow [the commit message norm][2] in your pull request. If you need help to make a pull request, read the [Github help page about creating pull requests][3].
8. Wait for one of the core developers either to include your change in the codebase, or to comment on possible improvements you should make to your code.
That's it: you have contributed to this open-source project! Congratulations!
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
[3]: https://help.github.com/articles/using-pull-requests

View File

@@ -0,0 +1,360 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class CronJobsForms
{
protected static $module = false;
public static function init($module)
{
if (self::$module == false) {
self::$module = $module;
}
return self::$module;
}
public static function getJobForm($title = 'New cron task', $update = false)
{
$form = array(
array(
'form' => array(
'legend' => array(
'title' => self::$module->l($title),
'icon' => 'icon-plus',
),
'input' => array(),
'submit' => array('title' => self::$module->l('Save', 'CronJobsForms'), 'type' => 'submit', 'class' => 'btn btn-default pull-right'),
),
),
);
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
$currencies_cron_url = Tools::getShopDomain(true, true).__PS_BASE_URI__.basename(_PS_ADMIN_DIR_);
$currencies_cron_url .= '/cron_currency_rates.php?secure_key='.md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME'));
if (($update == true) && (Tools::isSubmit('id_cronjob'))) {
$id_cronjob = (int)Tools::getValue('id_cronjob');
$id_module = (int)Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.bqSQL(self::$module->name).'`
WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'
AND `id_shop` = \''.$id_shop.'\' AND `id_shop_group` = \''.$id_shop_group.'\'');
if ((bool)$id_module == true) {
$form[0]['form']['input'][] = array(
'type' => 'free',
'name' => 'description',
'label' => self::$module->l('Task description', 'CronJobsForms'),
'placeholder' => self::$module->l('Update my currencies', 'CronJobsForms'),
);
$form[0]['form']['input'][] = array(
'type' => 'free',
'name' => 'task',
'label' => self::$module->l('Target link', 'CronJobsForms'),
);
} else {
$form[0]['form']['input'][] = array(
'type' => 'text',
'name' => 'description',
'label' => self::$module->l('Task description', 'CronJobsForms'),
'desc' => self::$module->l('Enter a description for this task.', 'CronJobsForms'),
'placeholder' => self::$module->l('Update my currencies', 'CronJobsForms'),
);
$form[0]['form']['input'][] = array(
'type' => 'text',
'name' => 'task',
'label' => self::$module->l('Target link', 'CronJobsForms'),
'desc' => self::$module->l('Set the link of your cron task.', 'CronJobsForms'),
'placeholder' => $currencies_cron_url,
);
}
} else {
$form[0]['form']['input'][] = array(
'type' => 'text',
'name' => 'description',
'label' => self::$module->l('Task description', 'CronJobsForms'),
'desc' => self::$module->l('Enter a description for this task.', 'CronJobsForms'),
'placeholder' => self::$module->l('Update my currencies', 'CronJobsForms'),
);
$form[0]['form']['input'][] = array(
'type' => 'text',
'name' => 'task',
'label' => self::$module->l('Target link', 'CronJobsForms'),
'desc' => self::$module->l('Do not forget to use an absolute URL to make it valid! The link also has to be on the same domain as the shop.', 'CronJobsForms'),
'placeholder' => $currencies_cron_url,
);
}
$form[0]['form']['input'][] = array(
'type' => 'select',
'name' => 'hour',
'label' => self::$module->l('Task frequency', 'CronJobsForms'),
'desc' => self::$module->l('At what time should this task be executed?', 'CronJobsForms'),
'options' => array(
'query' => self::getHoursFormOptions(),
'id' => 'id', 'name' => 'name'
),
);
$form[0]['form']['input'][] = array(
'type' => 'select',
'name' => 'day',
'desc' => self::$module->l('On which day of the month should this task be executed?', 'CronJobsForms'),
'options' => array(
'query' => self::getDaysFormOptions(),
'id' => 'id', 'name' => 'name'
),
);
$form[0]['form']['input'][] = array(
'type' => 'select',
'name' => 'month',
'desc' => self::$module->l('On what month should this task be executed?', 'CronJobsForms'),
'options' => array(
'query' => self::getMonthsFormOptions(),
'id' => 'id', 'name' => 'name'
),
);
$form[0]['form']['input'][] = array(
'type' => 'select',
'name' => 'day_of_week',
'desc' => self::$module->l('On which day of the week should this task be executed?', 'CronJobsForms'),
'options' => array(
'query' => self::getDaysofWeekFormOptions(),
'id' => 'id', 'name' => 'name'
),
);
return $form;
}
public static function getForm()
{
$form = array(
'form' => array(
'legend' => array(
'title' => self::$module->l('Settings', 'CronJobsForms'),
'icon' => 'icon-cog',
),
'input' => array(
array(
'type' => 'radio',
'name' => 'cron_mode',
'label' => self::$module->l('Cron mode', 'CronJobsForms'),
'values' => array(
array('id' => 'webservice', 'value' => 'webservice', 'label' => self::$module->l('Basic', 'CronJobsForms'),
'p' => self::$module->l('Use the PrestaShop cron tasks webservice to execute your tasks.', 'CronJobsForms')),
array('id' => 'advanced', 'value' => 'advanced', 'label' => self::$module->l('Advanced', 'CronJobsForms'),
'p' => self::$module->l('For advanced users only: use your own crontab manager instead of PrestaShop cron tasks service.', 'CronJobsForms'))
),
),
),
'submit' => array('title' => self::$module->l('Save', 'CronJobsForms'), 'type' => 'submit', 'class' => 'btn btn-default pull-right'),
),
);
if (Configuration::get('CRONJOBS_MODE') == 'advanced') {
$form['form']['input'][] = array('type' => 'free', 'name' => 'advanced_help', 'col' => 9, 'offset' => 0);
}
return array($form);
}
public static function getFormValues()
{
$token = Configuration::get('CRONJOBS_EXECUTION_TOKEN', null, 0, 0);
$admin_folder = str_replace(_PS_ROOT_DIR_.'/', null, basename(_PS_ADMIN_DIR_));
if (version_compare(_PS_VERSION_, '1.7', '<') == true) {
$path = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.$admin_folder.'/';
$curl_url = $path.Context::getContext()->link->getAdminLink('AdminCronJobs', false);
$curl_url .= '&token='.$token;
} else {
$curl_url = Context::getContext()->link->getAdminLink('AdminCronJobs', false);
$curl_url .= '&token='.$token;
}
return array(
'cron_mode' => Configuration::get('CRONJOBS_MODE'),
'advanced_help' =>
'<div class="alert alert-info">
<p>'
.self::$module->l('The Advanced mode enables you to use your own cron tasks manager instead of PrestaShop cron tasks webservice.', 'CronJobsForms').' '
.self::$module->l('First of all, make sure the \'curl\' library is installed on your server.', 'CronJobsForms')
.'<br />'.self::$module->l('To execute your cron tasks, please insert the following line in your cron tasks manager:', 'CronJobsForms').'
</p>
<br />
<ul class="list-unstyled">
<li><code>0 * * * * curl '.(Configuration::get('PS_SSL_ENABLED') ? '-k ' : null).'"'.$curl_url.'"</code></li>
</ul>
</div>'
);
}
public static function getTasksList()
{
return array(
'description' => array('title' => self::$module->l('Task description', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'task' => array('title' => self::$module->l('Target link', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'hour' => array('title' => self::$module->l('Hour', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'day' => array('title' => self::$module->l('Day', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'month' => array('title' => self::$module->l('Month', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'day_of_week' => array('title' => self::$module->l('Day of week', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'updated_at' => array('title' => self::$module->l('Last execution', 'CronJobsForms'), 'type' => 'text', 'orderby' => false),
'one_shot' => array('title' => self::$module->l('One shot', 'CronJobsForms'), 'active' => 'oneshot', 'type' => 'bool', 'align' => 'center'),
'active' => array('title' => self::$module->l('Active', 'CronJobsForms'), 'active' => 'status', 'type' => 'bool', 'align' => 'center', 'orderby' => false),
);
}
public static function getNewJobFormValues()
{
return array(
'description' => Tools::safeOutput(Tools::getValue('description', null)),
'task' => Tools::safeOutput(Tools::getValue('task', null)),
'hour' => (int)Tools::getValue('hour', -1),
'day' => (int)Tools::getValue('day', -1),
'month' => (int)Tools::getValue('month', -1),
'day_of_week' => (int)Tools::getValue('day_of_week', -1),
);
}
public static function getUpdateJobFormValues()
{
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
$id_cronjob = (int)Tools::getValue('id_cronjob');
$cron = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.bqSQL(self::$module->name).'`
WHERE `id_cronjob` = \''.$id_cronjob.'\'
AND `id_shop` = \''.$id_shop.'\' AND `id_shop_group` = \''.$id_shop_group.'\'');
if ((bool)$cron['id_module'] == false) {
$description = Tools::safeOutput(Tools::getValue('description', $cron['description']));
$task = urldecode(Tools::getValue('task', $cron['task']));
} else {
$module_name = Db::getInstance()->getValue('SELECT `name` FROM `'._DB_PREFIX_.'module` WHERE `id_module` = \''.(int)$cron['id_module'].'\'');
$description = '<p class="form-control-static"><strong>'.Tools::safeOutput(Module::getModuleName($module_name)).'</strong></p>';
$task = '<p class="form-control-static"><strong>'.self::$module->l('Module - Hook', 'CronJobsForms').'</strong></p>';
}
return array(
'description' => $description,
'task' => $task,
'hour' => (int)Tools::getValue('hour', $cron['hour']),
'day' => (int)Tools::getValue('day', $cron['day']),
'month' => (int)Tools::getValue('month', $cron['month']),
'day_of_week' => (int)Tools::getValue('day_of_week', $cron['day_of_week']),
);
}
public static function getTasksListValues()
{
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
self::$module->addNewModulesTasks();
$crons = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.bqSQL(self::$module->name).'` WHERE `id_shop` = \''.$id_shop.'\' AND `id_shop_group` = \''.$id_shop_group.'\'');
foreach ($crons as $key => &$cron) {
if (empty($cron['id_module']) == false) {
$module = Module::getInstanceById((int)$cron['id_module']);
if ($module == false) {
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.bqSQL(self::$module->name).' WHERE `id_cronjob` = \''.(int)$cron['id_cronjob'].'\'');
unset($crons[$key]);
break;
}
$query = 'SELECT `name` FROM `'._DB_PREFIX_.'module` WHERE `id_module` = \''.(int)$cron['id_module'].'\'';
$module_name = Db::getInstance()->getValue($query);
$cron['description'] = Tools::safeOutput(Module::getModuleName($module_name));
$cron['task'] = self::$module->l('Module - Hook', 'CronJobsForms');
} else {
$cron['task'] = urldecode($cron['task']);
}
$cron['hour'] = ($cron['hour'] == -1) ? self::$module->l('Every hour', 'CronJobsForms') : date('H:i', mktime((int)$cron['hour'], 0, 0, 0, 1));
$cron['day'] = ($cron['day'] == -1) ? self::$module->l('Every day', 'CronJobsForms') : (int)$cron['day'];
$cron['month'] = ($cron['month'] == -1) ? self::$module->l('Every month', 'CronJobsForms') : self::$module->l(date('F', mktime(0, 0, 0, (int)$cron['month'], 1)));
$cron['day_of_week'] = ($cron['day_of_week'] == -1) ? self::$module->l('Every day of the week', 'CronJobsForms') : self::$module->l(date('l', mktime(0, 0, 0, 0, (int)$cron['day_of_week'])));
$cron['updated_at'] = ($cron['updated_at'] == 0) ? self::$module->l('Never', 'CronJobsForms') : date('Y-m-d H:i:s', strtotime($cron['updated_at']));
$cron['one_shot'] = (bool)$cron['one_shot'];
$cron['active'] = (bool)$cron['active'];
}
return $crons;
}
protected static function getHoursFormOptions()
{
$data = array(array('id' => '-1', 'name' => self::$module->l('Every hour', 'CronJobsForms')));
for ($hour = 0; $hour < 24; $hour += 1) {
$data[] = array('id' => $hour, 'name' => date('H:i', mktime($hour, 0, 0, 0, 1)));
}
return $data;
}
protected static function getDaysFormOptions()
{
$data = array(array('id' => '-1', 'name' => self::$module->l('Every day of the month', 'CronJobsForms')));
for ($day = 1; $day <= 31; $day += 1) {
$data[] = array('id' => $day, 'name' => $day);
}
return $data;
}
protected static function getMonthsFormOptions()
{
$data = array(array('id' => '-1', 'name' => self::$module->l('Every month', 'CronJobsForms')));
for ($month = 1; $month <= 12; $month += 1) {
$data[] = array('id' => $month, 'name' => self::$module->l(date('F', mktime(0, 0, 0, $month, 1))));
}
return $data;
}
protected static function getDaysofWeekFormOptions()
{
$data = array(array('id' => '-1', 'name' => self::$module->l('Every day of the week', 'CronJobsForms')));
for ($day = 1; $day <= 7; $day += 1) {
$data[] = array('id' => $day, 'name' => self::$module->l(date('l', strtotime('Sunday +' . $day . ' days'))));
}
return $data;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,19 @@
{
"name": "prestashop/cronjobs",
"description": "PrestaShop module cronjobs",
"homepage": "https://github.com/PrestaShop/cronjobs",
"license": "AFL - Academic Free License (AFL 3.0)",
"authors": [
{
"name": "PrestaShop SA",
"email": "contact@prestashop.com"
}
],
"require": {
"php": ">=5.3.2"
},
"config": {
"preferred-install": "dist"
},
"type": "prestashop-module"
}

19
modules/cronjobs/composer.lock generated Normal file
View File

@@ -0,0 +1,19 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e2d310e6a8e3ee5c2298218a39d9fbd1",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.2"
},
"platform-dev": []
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>cronjobs</name>
<displayName><![CDATA[Cron tasks manager]]></displayName>
<version><![CDATA[1.3.2]]></version>
<description><![CDATA[Manage all your automated web tasks from a single interface.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>cronjobs</name>
<displayName><![CDATA[Cron tasks manager]]></displayName>
<version><![CDATA[1.4.0]]></version>
<description><![CDATA[Manage all your automated web tasks from a single interface.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,104 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AdminCronJobsController extends ModuleAdminController
{
public function __construct()
{
if (Tools::getValue('token') != Configuration::getGlobalValue('CRONJOBS_EXECUTION_TOKEN')) {
die('Invalid token');
}
parent::__construct();
$this->postProcess();
die;
}
public function postProcess()
{
$this->module->sendCallback();
ob_start();
$this->runModulesCrons();
$this->runTasksCrons();
ob_end_clean();
}
protected function runModulesCrons()
{
$query = 'SELECT * FROM '._DB_PREFIX_.bqSQL($this->module->name).' WHERE `active` = 1 AND `id_module` IS NOT NULL';
$crons = Db::getInstance()->executeS($query);
if (is_array($crons) && (count($crons) > 0)) {
foreach ($crons as &$cron) {
$module = Module::getInstanceById((int)$cron['id_module']);
if ($module == false) {
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.bqSQL($this->module->name).' WHERE `id_cronjob` = \''.(int)$cron['id_cronjob'].'\'');
break;
} elseif ($this->shouldBeExecuted($cron) == true) {
Hook::exec('actionCronJob', array(), $cron['id_module']);
$query = 'UPDATE '._DB_PREFIX_.bqSQL($this->module->name).' SET `updated_at` = NOW(), `active` = IF (`one_shot` = TRUE, FALSE, `active`) WHERE `id_cronjob` = \''.(int)$cron['id_cronjob'].'\'';
Db::getInstance()->execute($query);
}
}
}
}
protected function runTasksCrons()
{
$query = 'SELECT * FROM '._DB_PREFIX_.bqSQL($this->module->name).' WHERE `active` = 1 AND `id_module` IS NULL';
$crons = Db::getInstance()->executeS($query);
if (is_array($crons) && (count($crons) > 0)) {
foreach ($crons as &$cron) {
if ($this->shouldBeExecuted($cron) == true) {
Tools::file_get_contents(urldecode($cron['task']), false);
$query = 'UPDATE '._DB_PREFIX_.bqSQL($this->module->name).' SET `updated_at` = NOW(), `active` = IF (`one_shot` = TRUE, FALSE, `active`) WHERE `id_cronjob` = \''.(int)$cron['id_cronjob'].'\'';
Db::getInstance()->execute($query);
}
}
}
}
protected function shouldBeExecuted($cron)
{
$hour = ($cron['hour'] == -1) ? date('H') : $cron['hour'];
$day = ($cron['day'] == -1) ? date('d') : $cron['day'];
$month = ($cron['month'] == -1) ? date('m') : $cron['month'];
$day_of_week = ($cron['day_of_week'] == -1) ? date('D') : date('D', strtotime('Sunday +' . $cron['day_of_week'] . ' days'));
$day = date('Y').'-'.str_pad($month, 2, '0', STR_PAD_LEFT).'-'.str_pad($day, 2, '0', STR_PAD_LEFT);
$execution = $day_of_week.' '.$day.' '.str_pad($hour, 2, '0', STR_PAD_LEFT);
$now = date('D Y-m-d H');
return !(bool)strcmp($now, $execution);
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class CronjobsCallbackModuleFrontController extends ModuleFrontController
{
public function postProcess()
{
$this->module->sendCallback();
die;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,752 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
if (defined('_PS_ADMIN_DIR_') === false) {
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'/admin/');
}
require_once(dirname(__FILE__).'/classes/CronJobsForms.php');
class CronJobs extends Module
{
const EACH = -1;
protected $_successes;
protected $_warnings;
public $webservice_url = 'http://webcron.prestashop.com/crons';
public function __construct()
{
$this->name = 'cronjobs';
$this->tab = 'administration';
$this->version = '1.4.0';
$this->module_key = '';
$this->controllers = array('callback');
$this->author = 'PrestaShop';
$this->need_instance = true;
$this->bootstrap = true;
$this->display = 'view';
parent::__construct();
if ($this->id) {
$this->init();
}
$this->displayName = $this->l('Cron tasks manager');
$this->description = $this->l('Manage all your automated web tasks from a single interface.');
if (function_exists('curl_init') == false) {
$this->warning = $this->l('To be able to use this module, please activate cURL (PHP extension).');
}
}
public function install()
{
Configuration::updateValue('CRONJOBS_ADMIN_DIR', Tools::encrypt($this->getAdminDir()));
Configuration::updateValue('CRONJOBS_MODE', 'webservice');
Configuration::updateValue('CRONJOBS_MODULE_VERSION', $this->version);
Configuration::updateValue('CRONJOBS_WEBSERVICE_ID', 0);
$token = Tools::encrypt(Tools::getShopDomainSsl().time());
Configuration::updateGlobalValue('CRONJOBS_EXECUTION_TOKEN', $token);
if (parent::install()) {
$this->updateWebservice(true);
return $this->installDb() && $this->installTab() &&
$this->registerHook('actionModuleRegisterHookAfter') &&
$this->registerHook('actionModuleUnRegisterHookAfter') &&
$this->registerHook('backOfficeHeader');
}
return false;
}
protected function getAdminDir()
{
return basename(_PS_ADMIN_DIR_);
}
protected function init()
{
$new_admin_dir = (Tools::encrypt($this->getAdminDir()) != Configuration::get('CRONJOBS_ADMIN_DIR'));
$new_module_version = version_compare($this->version, Configuration::get('CRONJOBS_MODULE_VERSION'), '!=');
if ($new_admin_dir || $new_module_version) {
Configuration::updateValue('CRONJOBS_MODULE_VERSION', $this->version);
Configuration::updateValue('CRONJOBS_ADMIN_DIR', Tools::encrypt($this->getAdminDir()));
if (Configuration::get('CRONJOBS_MODE') == 'webservice') {
$this->updateWebservice(true);
return $this->enableWebservice();
}
return $this->disableWebservice();
}
}
public function uninstall()
{
Configuration::deleteByName('CRONJOBS_MODE');
$this->disableWebservice();
return $this->uninstallDb() &&
$this->uninstallTab() &&
parent::uninstall();
}
public function installDb()
{
return Db::getInstance()->execute(
'CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.bqSQL($this->name).' (
`id_cronjob` INTEGER(10) NOT NULL AUTO_INCREMENT,
`id_module` INTEGER(10) DEFAULT NULL,
`description` TEXT DEFAULT NULL,
`task` TEXT DEFAULT NULL,
`hour` INTEGER DEFAULT \'-1\',
`day` INTEGER DEFAULT \'-1\',
`month` INTEGER DEFAULT \'-1\',
`day_of_week` INTEGER DEFAULT \'-1\',
`updated_at` DATETIME DEFAULT NULL,
`one_shot` BOOLEAN NOT NULL DEFAULT 0,
`active` BOOLEAN DEFAULT FALSE,
`id_shop` INTEGER DEFAULT \'0\',
`id_shop_group` INTEGER DEFAULT \'0\',
PRIMARY KEY(`id_cronjob`),
INDEX (`id_module`))
ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'
);
}
public function uninstallDb()
{
return Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.bqSQL($this->name));
}
public function installTab()
{
$tab = new Tab();
$tab->active = 1;
$tab->name = array();
$tab->class_name = 'AdminCronJobs';
foreach (Language::getLanguages(true) as $lang) {
$tab->name[$lang['id_lang']] = 'Cron Jobs';
}
$tab->id_parent = -1;
$tab->module = $this->name;
return $tab->add();
}
public function uninstallTab()
{
$id_tab = (int)Tab::getIdFromClassName('AdminCronJobs');
if ($id_tab) {
$tab = new Tab($id_tab);
return $tab->delete();
}
return false;
}
public function hookActionModuleRegisterHookAfter($params)
{
$hook_name = $params['hook_name'];
if ($hook_name == 'actionCronJob') {
$module = $params['object'];
$this->registerModuleHook($module->id);
$this->updateWebservice(Configuration::get('CRONJOBS_MODE') == 'webservice');
}
}
public function hookActionModuleUnRegisterHookAfter($params)
{
$hook_name = $params['hook_name'];
if ($hook_name == 'actionCronJob') {
$module = $params['object'];
$this->unregisterModuleHook($module->id);
$this->updateWebservice(Configuration::get('CRONJOBS_MODE') == 'webservice');
}
}
public function hookBackOfficeHeader()
{
if (Tools::getValue('configure') == $this->name) {
if (version_compare(_PS_VERSION_, '1.6', '<') == true) {
$this->context->controller->addCSS($this->_path.'views/css/bootstrap.min.css');
$this->context->controller->addCSS($this->_path.'views/css/configure-ps-15.css');
} else {
$this->context->controller->addCSS($this->_path.'views/css/configure-ps-16.css');
}
}
}
public function getContent()
{
$output = null;
CronJobsForms::init($this);
$this->checkLocalEnvironment();
if (Tools::isSubmit('submitCronJobs')) {
$this->postProcessConfiguration();
} elseif (Tools::isSubmit('submitNewCronJob')) {
$submit_cron = $this->postProcessNewJob();
} elseif (Tools::isSubmit('submitUpdateCronJob')) {
$submit_cron = $this->postProcessUpdateJob();
}
$this->context->smarty->assign(array(
'module_dir' => $this->_path,
'module_local_dir' => $this->local_path,
));
$this->context->smarty->assign('form_errors', $this->_errors);
$this->context->smarty->assign('form_infos', $this->_warnings);
$this->context->smarty->assign('form_successes', $this->_successes);
if ((Tools::isSubmit('submitNewCronJob') || Tools::isSubmit('newcronjobs') || Tools::isSubmit('updatecronjobs')) &&
((isset($submit_cron) == false) || ($submit_cron === false))) {
$back_url = $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name
.'&token='.Tools::getAdminTokenLite('AdminModules');
}
$output = $output.$this->context->smarty->fetch($this->local_path.'views/templates/admin/configure.tpl');
if (Tools::isSubmit('newcronjobs') || ((isset($submit_cron) == true) && ($submit_cron === false))) {
$output = $output.$this->renderForm(CronJobsForms::getJobForm(), CronJobsForms::getNewJobFormValues(), 'submitNewCronJob', true, $back_url);
} elseif (Tools::isSubmit('updatecronjobs') && Tools::isSubmit('id_cronjob')) {
$form_structure = CronJobsForms::getJobForm('Update cron task', true);
$form = $this->renderForm($form_structure, CronJobsForms::getUpdateJobFormValues(), 'submitUpdateCronJob', true, $back_url, true);
$output = $output.$form;
} elseif (Tools::isSubmit('deletecronjobs') && Tools::isSubmit('id_cronjob')) {
$this->postProcessDeleteCronJob((int)Tools::getValue('id_cronjob'));
} elseif (Tools::isSubmit('oneshotcronjobs')) {
$this->postProcessUpdateJobOneShot();
} elseif (Tools::isSubmit('statuscronjobs')) {
$this->postProcessUpdateJobStatus();
} elseif (defined('_PS_HOST_MODE_') == false) {
$output = $output.$this->renderForm(CronJobsForms::getForm(), CronJobsForms::getFormValues(), 'submitCronJobs');
}
return $output.$this->renderTasksList();
}
public function sendCallback()
{
ignore_user_abort(true);
set_time_limit(0);
ob_start();
echo $this->name.'_prestashop';
header('Connection: close');
header('Content-Length: '.ob_get_length());
ob_end_flush();
ob_flush();
flush();
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
}
}
public static function isActive($id_module)
{
$module = Module::getInstanceByName('cronjobs');
if (($module == false) || ($module->active == false)) {
return false;
}
$query = 'SELECT `active` FROM '._DB_PREFIX_.'cronjobs WHERE `id_module` = \''.(int)$id_module.'\'';
return (bool)Db::getInstance()->getValue($query);
}
/**
* $taks should be a valid URL
*/
public static function addOneShotTask($task, $description, $execution = array())
{
if (self::isTaskURLValid($task) == false) {
return false;
}
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
$query = 'SELECT `active` FROM '._DB_PREFIX_.'cronjobs
WHERE `task` = \''.urlencode($task).'\' AND `updated_at` IS NULL
AND `one_shot` IS TRUE
AND `id_shop` = \''.$id_shop.'\' AND `id_shop_group` = \''.$id_shop_group.'\'';
if ((bool)Db::getInstance()->getValue($query) == true) {
return true;
}
if (count($execution) == 0) {
$query = 'INSERT INTO '._DB_PREFIX_.'cronjobs
(`description`, `task`, `hour`, `day`, `month`, `day_of_week`, `updated_at`, `one_shot`, `active`, `id_shop`, `id_shop_group`)
VALUES (\''. Db::getInstance()->escape($description) .'\', \'' .
urlencode($task) . '\', \'0\', \''.CronJobs::EACH.'\', \''.CronJobs::EACH.'\', \''.CronJobs::EACH.'\',
NULL, TRUE, TRUE, '.$id_shop.', '.$id_shop_group.')';
return Db::getInstance()->execute($query);
} else {
$is_frequency_valid = true;
$hour = (int)$execution['hour'];
$day = (int)$execution['day'];
$month = (int)$execution['month'];
$day_of_week = (int)$execution['day_of_week'];
$is_frequency_valid = (($hour >= -1) && ($hour < 24) && $is_frequency_valid);
$is_frequency_valid = (($day >= -1) && ($day <= 31) && $is_frequency_valid);
$is_frequency_valid = (($month >= -1) && ($month <= 31) && $is_frequency_valid);
$is_frequency_valid = (($day_of_week >= -1) && ($day_of_week < 7) && $is_frequency_valid);
if ($is_frequency_valid == true) {
$query = 'INSERT INTO '._DB_PREFIX_.'cronjobs
(`description`, `task`, `hour`, `day`, `month`, `day_of_week`, `updated_at`, `one_shot`, `active`, `id_shop`, `id_shop_group`)
VALUES (\''. Db::getInstance()->escape($description) .'\', \'' .
urlencode($task) . '\', \''.$hour.'\', \''.$day.'\', \''.$month.'\', \''.$day_of_week.'\',
NULL, TRUE, TRUE, '.$id_shop.', '.$id_shop_group.')';
return Db::getInstance()->execute($query);
}
}
return false;
}
protected function checkLocalEnvironment()
{
if ($this->isLocalEnvironment() == true) {
$this->setWarningMessage('You are using the Cron jobs module on a local installation:
you will not be able to use the Basic mode or reliably call remote cron tasks in your current environment.
To use this module at its best, you should switch to an online installation.');
}
}
protected function isLocalEnvironment()
{
if (isset($_SERVER['REMOTE_ADDR']) === false) {
return true;
}
return in_array(Tools::getRemoteAddr(), array('127.0.0.1', '::1')) || preg_match('/^172\.16\.|^192\.168\.|^10\.|^127\.|^localhost|\.local$/', Configuration::get('PS_SHOP_DOMAIN'));
}
protected function renderForm($form, $form_values, $action, $cancel = false, $back_url = false, $update = false)
{
$helper = new HelperForm();
$helper->show_toolbar = false;
$helper->module = $this;
$helper->default_form_language = $this->context->language->id;
$helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);
$helper->identifier = $this->identifier;
$helper->submit_action = $action;
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
if ($update == true) {
$helper->currentIndex .= '&id_cronjob='.(int)Tools::getValue('id_cronjob');
}
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->tpl_vars = array(
'fields_value' => $form_values,
'id_language' => $this->context->language->id,
'languages' => $this->context->controller->getLanguages(),
'back_url' => $back_url,
'show_cancel_button' => $cancel,
);
return $helper->generateForm($form);
}
protected function renderTasksList()
{
$helper = new HelperList();
$helper->title = $this->l('Cron tasks');
$helper->table = $this->name;
$helper->no_link = true;
$helper->shopLinkType = '';
$helper->identifier = 'id_cronjob';
$helper->actions = array('edit', 'delete');
$values = CronJobsForms::getTasksListValues();
$helper->listTotal = count($values);
$helper->tpl_vars = array('show_filters' => false);
$helper->toolbar_btn['new'] = array(
'href' => $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name
.'&newcronjobs=1&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->l('Add new task')
);
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
return $helper->generateList($values, CronJobsForms::getTasksList());
}
protected function postProcessConfiguration()
{
if (Tools::isSubmit('cron_mode') == true) {
if (Tools::getValue('cron_mode') == 'advanced') {
return $this->disableWebservice();
}
return $this->enableWebservice();
}
}
protected function postProcessNewJob()
{
if ($this->isNewJobValid() == true) {
$description = Db::getInstance()->escape(Tools::getValue('description'));
$task = urlencode(Tools::getValue('task'));
$hour = (int)Tools::getValue('hour');
$day = (int)Tools::getValue('day');
$month = (int)Tools::getValue('month');
$day_of_week = (int)Tools::getValue('day_of_week');
$result = Db::getInstance()->getRow('SELECT id_cronjob FROM '._DB_PREFIX_.bqSQL($this->name).'
WHERE `task` = \''.$task.'\' AND `hour` = \''.$hour.'\' AND `day` = \''.$day.'\'
AND `month` = \''.$month.'\' AND `day_of_week` = \''.$day_of_week.'\'');
if ($result == false) {
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
$query = 'INSERT INTO '._DB_PREFIX_.bqSQL($this->name).'
(`description`, `task`, `hour`, `day`, `month`, `day_of_week`, `updated_at`, `active`, `id_shop`, `id_shop_group`)
VALUES (\''.$description.'\', \''.$task.'\', \''.$hour.'\', \''.$day.'\', \''.$month.'\', \''.$day_of_week.'\', NULL, TRUE, '.$id_shop.', '.$id_shop_group.')';
if (($result = Db::getInstance()->execute($query)) != false) {
return $this->setSuccessMessage('The task has been successfully added.');
}
return $this->setErrorMessage('An error happened: the task could not be added.');
}
return $this->setErrorMessage('This cron task already exists.');
}
return false;
}
protected function postProcessUpdateJob()
{
if (Tools::isSubmit('id_cronjob') == false) {
return false;
}
$description = Db::getInstance()->escape(Tools::getValue('description'));
$task = urlencode(Tools::getValue('task'));
$hour = (int)Tools::getValue('hour');
$day = (int)Tools::getValue('day');
$month = (int)Tools::getValue('month');
$day_of_week = (int)Tools::getValue('day_of_week');
$id_cronjob = (int)Tools::getValue('id_cronjob');
// $id_shop = (int)Context::getContext()->shop->id;
// $id_shop_group = (int)Context::getContext()->shop->id_shop_group;
$query = 'UPDATE '._DB_PREFIX_.bqSQL($this->name).'
SET `description` = \''.$description.'\',
`task` = \''.$task.'\',
`hour` = \''.$hour.'\',
`day` = \''.$day.'\',
`month` = \''.$month.'\',
`day_of_week` = \''.$day_of_week.'\'
WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'';
if ((Db::getInstance()->execute($query)) != false) {
return $this->setSuccessMessage('The task has been updated.');
}
return $this->setErrorMessage('The task has not been updated');
}
public function addNewModulesTasks()
{
$crons = Hook::getHookModuleExecList('actionCronJob');
if ($crons == false) {
return false;
}
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
foreach ($crons as $cron) {
$id_module = (int)$cron['id_module'];
$module = Module::getInstanceById((int)$cron['id_module']);
if ($module == false) {
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.bqSQL($this->name).' WHERE `id_cronjob` = \''.(int)$cron['id_cronjob'].'\'');
break;
}
$cronjob = (bool)Db::getInstance()->getValue('SELECT `id_cronjob` FROM `'._DB_PREFIX_.bqSQL($this->name).'`
WHERE `id_module` = \''.$id_module.'\' AND `id_shop` = \''.$id_shop.'\' AND `id_shop_group` = \''.$id_shop_group.'\'');
if ($cronjob == false) {
$this->registerModuleHook($id_module);
}
}
}
protected function postProcessUpdateJobOneShot()
{
if (Tools::isSubmit('id_cronjob') == false) {
return false;
}
$id_cronjob = (int)Tools::getValue('id_cronjob');
// $id_shop = (int)Context::getContext()->shop->id;
// $id_shop_group = (int)Context::getContext()->shop->id_shop_group;
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.bqSQL($this->name).'
SET `one_shot` = IF (`one_shot`, 0, 1) WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'');
Tools::redirectAdmin($this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name
.'&token='.Tools::getAdminTokenLite('AdminModules'));
}
protected function postProcessUpdateJobStatus()
{
if (Tools::isSubmit('id_cronjob') == false) {
return false;
}
$id_cronjob = (int)Tools::getValue('id_cronjob');
// $id_shop = (int)Context::getContext()->shop->id;
// $id_shop_group = (int)Context::getContext()->shop->id_shop_group;
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.bqSQL($this->name).'
SET `active` = IF (`active`, 0, 1) WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'');
Tools::redirectAdmin($this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name
.'&token='.Tools::getAdminTokenLite('AdminModules'));
}
protected function isNewJobValid()
{
if ((Tools::isSubmit('description') == true) &&
(Tools::isSubmit('task') == true) &&
(Tools::isSubmit('hour') == true) &&
(Tools::isSubmit('day') == true) &&
(Tools::isSubmit('month') == true) &&
(Tools::isSubmit('day_of_week') == true)) {
if (self::isTaskURLValid(Tools::getValue('task')) == false) {
return $this->setErrorMessage('The target link you entered is not valid. It should be an absolute URL, on the same domain as your shop.');
}
$hour = Tools::getValue('hour');
$day = Tools::getValue('day');
$month = Tools::getValue('month');
$day_of_week = Tools::getValue('day_of_week');
return $this->isFrequencyValid($hour, $day, $month, $day_of_week);
}
return false;
}
protected function isFrequencyValid($hour, $day, $month, $day_of_week)
{
$success = true;
if ((($hour >= -1) && ($hour < 24)) == false) {
$success &= $this->setErrorMessage('The value you chose for the hour is not valid. It should be between 00:00 and 23:59.');
}
if ((($day >= -1) && ($day <= 31)) == false) {
$success &= $this->setErrorMessage('The value you chose for the day is not valid.');
}
if ((($month >= -1) && ($month <= 31)) == false) {
$success &= $this->setErrorMessage('The value you chose for the month is not valid.');
}
if ((($day_of_week >= -1) && ($day_of_week < 7)) == false) {
$success &= $this->setErrorMessage('The value you chose for the day of the week is not valid.');
}
return $success;
}
protected static function isTaskURLValid($task)
{
$task = urlencode($task);
$shop_url = urlencode(Tools::getShopDomain(true, true).__PS_BASE_URI__);
$shop_url_ssl = urlencode(Tools::getShopDomainSsl(true, true).__PS_BASE_URI__);
return ((strpos($task, $shop_url) === 0) || (strpos($task, $shop_url_ssl) === 0));
}
protected function setErrorMessage($message)
{
$this->_errors[] = $this->l($message);
return false;
}
protected function setSuccessMessage($message)
{
$this->_successes[] = $this->l($message);
return true;
}
protected function setWarningMessage($message)
{
$this->_warnings[] = $this->l($message);
return false;
}
protected function enableWebservice()
{
Configuration::updateValue('CRONJOBS_MODE', 'webservice');
$this->updateWebservice(true);
}
protected function disableWebservice()
{
Configuration::updateValue('CRONJOBS_MODE', 'advanced');
$this->updateWebservice(false);
}
protected function updateWebservice($use_webservice)
{
if ($this->isLocalEnvironment() == true) {
return true;
}
$link = new Link();
$admin_folder = $this->getAdminDir();
if (version_compare(_PS_VERSION_, '1.7', '<') == true) {
$path = Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.$admin_folder;
$cron_url = $path.'/'.$link->getAdminLink('AdminCronJobs', false);
} else {
$cron_url = $link->getAdminLink('AdminCronJobs', false);
}
$webservice_id = Configuration::get('CRONJOBS_WEBSERVICE_ID') ? '/'.Configuration::get('CRONJOBS_WEBSERVICE_ID') : null;
$data = array(
'callback' => $link->getModuleLink($this->name, 'callback'),
'domain' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__,
'cronjob' => $cron_url.'&token='.Configuration::getGlobalValue('CRONJOBS_EXECUTION_TOKEN'),
'cron_token' => Configuration::getGlobalValue('CRONJOBS_EXECUTION_TOKEN'),
'active' => (bool)$use_webservice
);
$context_options = array('http' => array(
'method' => (is_null($webservice_id) == true) ? 'POST' : 'PUT',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($data)
));
$result = Tools::file_get_contents($this->webservice_url.$webservice_id, false, stream_context_create($context_options));
if ($result != false) {
Configuration::updateValue('CRONJOBS_WEBSERVICE_ID', (int)$result);
}
if (((Tools::isSubmit('install') == true) || (Tools::isSubmit('reset') == true)) && ((bool)$result == false)) {
return true;
} elseif (((Tools::isSubmit('install') == false) || (Tools::isSubmit('reset') == false)) && ((bool)$result == false)) {
return $this->setErrorMessage('An error occurred while trying to contact PrestaShop\'s cron tasks webservice.');
}
if ((bool)$use_webservice == true) {
return $this->setSuccessMessage('Your cron tasks have been successfully added to PrestaShop\'s cron tasks webservice.');
}
return $this->setSuccessMessage('Your cron tasks have been successfully registered using the Advanced mode.');
}
protected function postProcessDeleteCronJob($id_cronjob)
{
$id_cronjob = Tools::getValue('id_cronjob');
$id_module = Db::getInstance()->getValue('SELECT `id_module` FROM '._DB_PREFIX_.bqSQL($this->name).' WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'');
if ((bool)$id_module == false) {
Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.bqSQL($this->name).' WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'');
} else {
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.bqSQL($this->name).' SET `active` = FALSE WHERE `id_cronjob` = \''.(int)$id_cronjob.'\'');
}
return Tools::redirectAdmin($this->context->link->getAdminLink('AdminModules', false)
.'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name
.'&token='.Tools::getAdminTokenLite('AdminModules'));
}
protected function registerModuleHook($id_module)
{
$module = Module::getInstanceById($id_module);
$id_shop = (int)Context::getContext()->shop->id;
$id_shop_group = (int)Context::getContext()->shop->id_shop_group;
if (is_callable(array($module, 'getCronFrequency')) == true) {
$frequency = $module->getCronFrequency();
$query = 'INSERT INTO '._DB_PREFIX_.bqSQL($this->name).'
(`id_module`, `hour`, `day`, `month`, `day_of_week`, `active`, `id_shop`, `id_shop_group`)
VALUES (\''.$id_module.'\', \''.$frequency['hour'].'\', \''.$frequency['day'].'\',
\''.$frequency['month'].'\', \''.$frequency['day_of_week'].'\',
TRUE, '.$id_shop.', '.$id_shop_group.')';
} else {
$query = 'INSERT INTO '._DB_PREFIX_.bqSQL($this->name).'
(`id_module`, `active`, `id_shop`, `id_shop_group`)
VALUES ('.$id_module.', FALSE, '.$id_shop.', '.$id_shop_group.')';
}
return Db::getInstance()->execute($query);
}
protected function unregisterModuleHook($id_module)
{
return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.bqSQL($this->name).' WHERE `id_module` = \''.(int)$id_module.'\'');
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

BIN
modules/cronjobs/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
modules/cronjobs/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
modules/cronjobs/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

View File

@@ -0,0 +1,51 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{hipay}prestashop>hipay_50089d40ef4536271e8b16dbe5763c01'] = 'HiPay';
$_MODULE['<{hipay}prestashop>hipay_035ab5edb2d8af86d51f6a92e65b4c0f'] = 'Sichere payement mit Visa, Mastercard und europäische Lösungen.';
$_MODULE['<{hipay}prestashop>hipay_5063b1c7402ff93d09defb875fa0085b'] = '[HiPay] Fehler: kann keine PaymentParams erstellen ';
$_MODULE['<{hipay}prestashop>hipay_a85eba4c6c699122b2bb1387ea4813ad'] = 'Warenkorb';
$_MODULE['<{hipay}prestashop>hipay_d4126d0b64579211d37151ef9b5af754'] = '[HiPay] Fehler: kann \"Warenkorb\" Produkt nicht erstellen';
$_MODULE['<{hipay}prestashop>hipay_ac2e397ffc0808f909e9712ca575c121'] = 'Gesamt Bestellung';
$_MODULE['<{hipay}prestashop>hipay_0f750bac4745ff32a0c4a4c663ae6b9f'] = '[HiPay] Fehler: kann Bestellung nicht erstellen';
$_MODULE['<{hipay}prestashop>hipay_8eafa453be20eba610cc8f5a8170681c'] = '[HiPay] Fehler:';
$_MODULE['<{hipay}prestashop>hipay_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Konfiguration aktualisiert';
$_MODULE['<{hipay}prestashop>hipay_0851f7a0844553fa1168718de0f87262'] = 'Sie sind nicht berechtigt, externe URLs (allow_url_fopen) zu öffnen';
$_MODULE['<{hipay}prestashop>hipay_6401593f1412a6b385c8e645d1f056ac'] = 'cURL ist nicht aktiviert';
$_MODULE['<{hipay}prestashop>hipay_f8b94463fa8b5591e5edbbb8021e8038'] = 'OpenSSL ist nicht aktiviert';
$_MODULE['<{hipay}prestashop>hipay_54457f20f1d9f9d7cf14d8e928cad1aa'] = 'Kann nicht auf Zahlungs-Gateway zugreifen';
$_MODULE['<{hipay}prestashop>hipay_527557971b02f68ead6a278fb96ac396'] = 'überprüfen Sie Ihre Firewall';
$_MODULE['<{hipay}prestashop>hipay_1c5f361b20c116ab2324e28b1ac54e12'] = 'Ihr Shop ist nicht online';
$_MODULE['<{hipay}prestashop>hipay_66170e45eb6eb71c35fc3b259a866ff7'] = 'HiPay Kategorien nicht für jede Seiten-ID eingestellt';
$_MODULE['<{hipay}prestashop>hipay_1a1a01512e42b64541ed9b1f43a56036'] = 'HiPay Kategorien können nicht abgerufen werden. Nehmen Sie zur Hilfe der Fehlerbereinigung das Fehlerprotokoll zur Hilfe.';
$_MODULE['<{hipay}prestashop>hipay_74e0ddca931daefcd88f3c118e8eb0f1'] = 'HiPay ist eine sichere elektronische Geldbörse. HiPay besitzt die Zulassung der Europäischen Zentralbank. HiPay bietet Ihnen die Annahme vieler Zahlungsmöglichkeiten, ohne dass Sie mit einer Bank verhandeln müssen. Einfach und kostenlos zu nutzen. HiPay ist eine Bereicherung für den e-commerce und Webseiten, die Ihre Geschäfte in Europa ausweiten wollen. HiPay bietet: sichere Bezahlung durch Kartensysteme, Überweisung, und vieles mehr...';
$_MODULE['<{hipay}prestashop>hipay_01ad06b7c5887516f56ff824278feb67'] = 'Hinweis: Wenn Sie eine Zahlung erstatten möchten, melden Sie sich bei Ihrem HiPay-Konto an, gehen Sie zu \"Merchant Management\" -> Verkaufsmanagement.';
$_MODULE['<{hipay}prestashop>hipay_254f642527b45bc260048e30704edb39'] = 'Konfiguration';
$_MODULE['<{hipay}prestashop>hipay_d86590564b22be4d3b242472722bf969'] = 'Die Konfiguration von HiPay ist einfach und erfolgt in drei Schritten';
$_MODULE['<{hipay}prestashop>hipay_f21850b58e4866b30f7d3724cc29edb1'] = 'Melden Sie sich bei Ihrem Händler-Konto an';
$_MODULE['<{hipay}prestashop>hipay_dc32882bf2b1893d53aeaaa862c46d5c'] = 'Erstellen Sie ein hiPay-Konto ';
$_MODULE['<{hipay}prestashop>hipay_854348e0cffd068204ce979351b2eb10'] = 'Aktivieren Sie HiPay für Ihren Prestashop, es ist kostenlos!';
$_MODULE['<{hipay}prestashop>hipay_b7ce0a1dce723a074049b88fb22dbb4d'] = 'Erfahren Sie mehr über Sonderkonditionen auf Transaktionen über prestashop, indem Sie';
$_MODULE['<{hipay}prestashop>hipay_7667c2b31b9980267cb526ed2f0d235d'] = 'unseren Support kontaktieren';
$_MODULE['<{hipay}prestashop>hipay_d08cf8ae06cc7e3151aad4618c6efe3a'] = 'Konfiguration im';
$_MODULE['<{hipay}prestashop>hipay_0f26e4f64d58beb4d924627c707e43ad'] = 'Kontonummer';
$_MODULE['<{hipay}prestashop>hipay_315f3c78ea54c8dadb082acc328dd5bd'] = 'Händler-Kennwort';
$_MODULE['<{hipay}prestashop>hipay_7e5b4f84e3fafbbef48a26808664ee47'] = 'È possibile ottenere una guida in PDF per configurare Hipay su Prestashop';
$_MODULE['<{hipay}prestashop>hipay_b250a007769c7ffe655c74cfb8176b8c'] = 'Seiten-ID';
$_MODULE['<{hipay}prestashop>hipay_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Kategorie';
$_MODULE['<{hipay}prestashop>hipay_4de3b490bff03a1e715d142cdd41d3f4'] = 'Autorisierte Altersgruppe';
$_MODULE['<{hipay}prestashop>hipay_a19a3f71c627a4bde1e016a46f313799'] = 'Für alle Altersstufen';
$_MODULE['<{hipay}prestashop>hipay_1ddfab06495a5d2dfcf174034546502d'] = 'Ab 12 Jahren und älter';
$_MODULE['<{hipay}prestashop>hipay_524fefef83fd5b0b82292a5366b40cd2'] = 'Ab 16 Jahren und älter';
$_MODULE['<{hipay}prestashop>hipay_4f47a2eb5f2af6c1419baa17794e5f03'] = 'Ab 18 Jahren und älter';
$_MODULE['<{hipay}prestashop>hipay_0d10a9cae9827e30b09913c1ec6ef2db'] = 'Hinweis: Bitte sicherstellen, dass der Währungsmodus, den Sie im Zahlungs-Tab gewählt haben, mit Ihrem HiPay Konto (en) kompatibel ist.';
$_MODULE['<{hipay}prestashop>hipay_c80a51a60c5ee43553c3881459b8f431'] = 'Konfiguration aktualisieren';
$_MODULE['<{hipay}prestashop>hipay_e13074ee37ba40a9a412a957b02e42f8'] = 'Zones Einschränkungen';
$_MODULE['<{hipay}prestashop>hipay_c6eb6bc44fbc78b79cc40f8012eb7634'] = 'Wählen Sie die zugelassenen Linienverkehre Zonen';
$_MODULE['<{hipay}prestashop>hipay_b718adec73e04ce3ec720dd11a06a308'] = 'Identifikation';
$_MODULE['<{hipay}prestashop>hipay_dad1f8d794ee0dd7753fe75e73b78f31'] = 'Zones';
$_MODULE['<{hipay}prestashop>hipay_646ac4a2df12eae08dd8e3e749fd9daa'] = 'Update-Zonen';
$_MODULE['<{hipay}prestashop>payment_cb047ebd77ec02c36fbac405f8c9922c'] = 'Bezahlen Sie mit Hipay (Sichere payement mit Visa, Mastercard und europäische Lösungen)';
$_MODULE['<{hipay}prestashop>payment_35d5d65e0fb908f81b8c36820ddd7cc6'] = 'erforderlicher Minimalbetrag , um mit Hipay bezahlen:';
$_MODULE['<{hipay}prestashop>payment_e755d43d98e3d597b4492d2e6493ffed'] = '(Sandbox / Test-Modus)';

View File

@@ -0,0 +1,55 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{cronjobs}prestashop>cronjobsforms_c9cc8cce247e49bae79f15173ce97354'] = 'Save';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_d4169d52732e9ae8df56d2cbcad81a94'] = 'Task description';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_70d4968bea9a6e76c0333904b9d385e4'] = 'Update my currencies';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_0eff773cf33456a033e913f6ed18045c'] = 'Target link';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_07045abc579615634804f42bc0b2b4bb'] = 'Enter a description for this task.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_43773e69610c99be6c15daa4a2036443'] = 'Set the link of your cron task.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_3a21e2309e8e6aa3759e466154508f2c'] = 'Do not forget to use an absolute URL to make it valid! The link also has to be on the same domain as the shop.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_be938fb8c5582085599dfa95368fb489'] = 'Task frequency';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3364fad867d47ca61265fd315e4071e'] = 'At what time should this task be executed?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6c5d30049c4d8d644bd35650be4ac13a'] = 'On which day of the month should this task be executed?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_a1457ee25ec20fa032d37509b5a90a4e'] = 'On what month should this task be executed?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_65f768d204a3118f426c756056bef1e1'] = 'On which day of the week should this task be executed?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3419e63398ccc41c062f36631bebd9a'] = 'Cron mode';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_972e73b7a882d0802a4e3a16946a2f94'] = 'Basic';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_eaf1dc6d93a18adb2619233d8e99c197'] = 'Use the PrestaShop cron tasks webservice to execute your tasks.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_9b6545e4cea9b4ad4979d41bb9170e2b'] = 'Advanced';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b6610b26530c9ee3d7bc4a478cf35299'] = 'For advanced users only: use your own crontab manager instead of PrestaShop cron tasks service.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_2257d36bcb68362b24cf74f626bac599'] = 'The Advanced mode enables you to use your own cron tasks manager instead of PrestaShop cron tasks webservice.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_94ad8b9f9d516489693dd835cf22bd3b'] = 'First of all, make sure the \'curl\' library is installed on your server.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_18028ef85b7ce8fbde749a2c49c6d18a'] = 'To execute your cron tasks, please insert the following line in your cron tasks manager:';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b55e509c697e4cca0e1d160a7806698f'] = 'Hour';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_03727ac48595a24daed975559c944a44'] = 'Day';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_7cbb885aa1164b390a0bc050a64e1812'] = 'Month';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_e59278675b8f1e052b22b7e5e7d65da7'] = 'Day of week';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8cebfac3b4821cbc83041f5df54d7730'] = 'Last execution';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_1e3208e0b0d5de9281f88c34169cda6b'] = 'One shot';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Active';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_bdb6ae0d03e6793183349e00f67657f6'] = 'Module - Hook';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_02fd27d2951d00b83f111f63611ea863'] = 'Every hour';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_48bf14c419a1d441412510faf39c326d'] = 'Every day';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8ed91b71d01993965915f3b296c20336'] = 'Every month';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_50875e72e1477618055d1508112199b4'] = 'Every day of the week';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6e7b34fa59e1bd229b207892956dc41c'] = 'Never';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_16ed0a7b977ec3bbd23badfb5580d56f'] = 'Every day of the month';
$_MODULE['<{cronjobs}prestashop>cronjobs_682ee2e41e510efdbced967430173c66'] = 'Cron tasks manager';
$_MODULE['<{cronjobs}prestashop>cronjobs_c75e110ddb05aea61563c50d7baf0ae0'] = 'Manage all your automated web tasks from a single interface.';
$_MODULE['<{cronjobs}prestashop>cronjobs_4093808c9781fb6ca2ed5ade71deff4d'] = 'To be able to use this module, please activate cURL (PHP extension).';
$_MODULE['<{cronjobs}prestashop>cronjobs_035d5cdab2c65ad42b303f8125025160'] = 'Cron tasks';
$_MODULE['<{cronjobs}prestashop>cronjobs_6588952424b58b4c9fc9df026b668991'] = 'Add new task';
$_MODULE['<{cronjobs}prestashop>form_ef7bd68a02b6b5656554f7a27d1c7bdf'] = 'Error!';
$_MODULE['<{cronjobs}prestashop>form_dc3fd488f03d423a04da27ce66274c1b'] = 'Warning!';
$_MODULE['<{cronjobs}prestashop>form_402e7a087747cb56c718bde84651f96a'] = 'Success!';
$_MODULE['<{cronjobs}prestashop>configure_27c1f598c2b2b0a8e64424d257e8b398'] = 'What does this module do?';
$_MODULE['<{cronjobs}prestashop>configure_c22203a97c7dd88dd68d1e864d46ee0c'] = 'Originally, cron is a Unix system tool that provides time-based job scheduling: you can create many cron jobs, which are then run periodically at fixed times, dates, or intervals.';
$_MODULE['<{cronjobs}prestashop>configure_d24ca73e026491b9610193f36d5edec8'] = 'This module provides you with a cron-like tool: you can create jobs which will call a given set of secure URLs to your PrestaShop store, thus triggering updates and other automated tasks.';
$_MODULE['<{cronjobs}prestashop>task_b43ff85c4fc17955aa3ba90827d65430'] = 'Do not forget to use an absolute URL in the target link to make it valid! The link also has to be on the same domain as the shop.';
return $_MODULE;

View File

@@ -0,0 +1,55 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{cronjobs}prestashop>cronjobsforms_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_d4169d52732e9ae8df56d2cbcad81a94'] = 'Descripción de la tarea';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_70d4968bea9a6e76c0333904b9d385e4'] = 'Actualizar mis monedas';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_0eff773cf33456a033e913f6ed18045c'] = 'Objetivo del enlace';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_07045abc579615634804f42bc0b2b4bb'] = 'Escriba una descripción para esta tarea.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_43773e69610c99be6c15daa4a2036443'] = 'Establece el enlace a su tarea programada.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_3a21e2309e8e6aa3759e466154508f2c'] = '¡No olvide usar una URL absoluta para que sea válido! El enlace también debe de estar en el mismo dominio que la tienda.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_be938fb8c5582085599dfa95368fb489'] = 'Frecuencia de la tarea';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3364fad867d47ca61265fd315e4071e'] = '¿A qué hora debe ejecutarse esta tarea?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6c5d30049c4d8d644bd35650be4ac13a'] = '¿Qué día del mes debe ejecutarse esta tarea?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_a1457ee25ec20fa032d37509b5a90a4e'] = '¿Qué mes debe ejecutarse esta tarea?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_65f768d204a3118f426c756056bef1e1'] = '¿Qué día de la semana debe ejecutarse esta tarea?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_f4f70727dc34561dfde1a3c529b6205c'] = 'Ajustes';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3419e63398ccc41c062f36631bebd9a'] = 'Modo Cron';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_972e73b7a882d0802a4e3a16946a2f94'] = 'Básico';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_eaf1dc6d93a18adb2619233d8e99c197'] = 'Usa el servicio web de tareas Cron de PrestaShop para ejecutar sus tareas.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_9b6545e4cea9b4ad4979d41bb9170e2b'] = 'Avanzado';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b6610b26530c9ee3d7bc4a478cf35299'] = 'Sólo para usuarios avanzados: use su propio gestor de crontab en vez del servicio de las tareas cron de PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_2257d36bcb68362b24cf74f626bac599'] = 'El modo avanzado permite que usted utilice su propio gestor de tareas cron en lugar del servicio web de tareas cron de PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_94ad8b9f9d516489693dd835cf22bd3b'] = 'Antes que nada, asegúrese de que la librería "curl" está instalada en su servidor.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_18028ef85b7ce8fbde749a2c49c6d18a'] = 'Para ejecutar sus tareas cron, por favor, inserte la siguiente línea en su gestor de tareas cron:';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b55e509c697e4cca0e1d160a7806698f'] = 'Hora';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_03727ac48595a24daed975559c944a44'] = 'Día';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_7cbb885aa1164b390a0bc050a64e1812'] = 'Mes';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_e59278675b8f1e052b22b7e5e7d65da7'] = 'Día de la semana';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8cebfac3b4821cbc83041f5df54d7730'] = 'Última ejecución';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_1e3208e0b0d5de9281f88c34169cda6b'] = 'Una ronda';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activar';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_bdb6ae0d03e6793183349e00f67657f6'] = 'Módulo - Hook';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_02fd27d2951d00b83f111f63611ea863'] = 'Cada hora';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_48bf14c419a1d441412510faf39c326d'] = 'Cada día';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8ed91b71d01993965915f3b296c20336'] = 'Cada mes';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_50875e72e1477618055d1508112199b4'] = 'Todos los días de la semana';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6e7b34fa59e1bd229b207892956dc41c'] = 'Nunca';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_16ed0a7b977ec3bbd23badfb5580d56f'] = 'Todos los días del mes';
$_MODULE['<{cronjobs}prestashop>cronjobs_682ee2e41e510efdbced967430173c66'] = 'Gestor de tareas cron';
$_MODULE['<{cronjobs}prestashop>cronjobs_c75e110ddb05aea61563c50d7baf0ae0'] = 'Gestione todas sus tareas automatizadas desde una única interfaz.';
$_MODULE['<{cronjobs}prestashop>cronjobs_4093808c9781fb6ca2ed5ade71deff4d'] = 'Para poder utilizar este módulo, por favor, active cURL (una extensión de PHP).';
$_MODULE['<{cronjobs}prestashop>cronjobs_035d5cdab2c65ad42b303f8125025160'] = 'Tareas cron';
$_MODULE['<{cronjobs}prestashop>cronjobs_6588952424b58b4c9fc9df026b668991'] = 'Añadir nueva tarea';
$_MODULE['<{cronjobs}prestashop>form_ef7bd68a02b6b5656554f7a27d1c7bdf'] = '¡Error!';
$_MODULE['<{cronjobs}prestashop>form_dc3fd488f03d423a04da27ce66274c1b'] = '¡Atención!';
$_MODULE['<{cronjobs}prestashop>form_402e7a087747cb56c718bde84651f96a'] = '¡Éxito!';
$_MODULE['<{cronjobs}prestashop>configure_27c1f598c2b2b0a8e64424d257e8b398'] = '¿Qué hace este módulo?';
$_MODULE['<{cronjobs}prestashop>configure_c22203a97c7dd88dd68d1e864d46ee0c'] = 'Originalmente, cron es una herramienta del sistema Unix que ofrece la planificación de tareas en el tiempo: puede crear tareas cron, que luego se ejecutan periódicamente en fechas fijas, fechas o intervalos.';
$_MODULE['<{cronjobs}prestashop>configure_d24ca73e026491b9610193f36d5edec8'] = 'Este módulo le ofrece una herramienta adaptada a cron: puede crear tareas que exigirán un determinado conjunto de direcciones URL seguras a su tienda PrestaShop, por lo tanto desencadenar actualizaciones y otras tareas automatizadas.';
$_MODULE['<{cronjobs}prestashop>task_b43ff85c4fc17955aa3ba90827d65430'] = '¡No olvide utilizar una dirección URL absoluta en el enlace de destino para que sea válido! El enlace también tiene que estar en el mismo dominio que la tienda.';
return $_MODULE;

View File

@@ -0,0 +1,65 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{cronjobs}prestashop>cronjobs_682ee2e41e510efdbced967430173c66'] = 'Éditeur de tâches cron';
$_MODULE['<{cronjobs}prestashop>cronjobs_c75e110ddb05aea61563c50d7baf0ae0'] = 'Gérez toutes vos tâches web automatisées depuis une interface unique.';
$_MODULE['<{cronjobs}prestashop>cronjobs_4093808c9781fb6ca2ed5ade71deff4d'] = 'Pour pouvoir utiliser ce module, veuillez activer cURL (extension PHP).';
$_MODULE['<{cronjobs}prestashop>cronjobs_3fb6877089c15977e1607e8fbd9c3904'] = 'Vous utilisez le module de tâches cron sur une installation locale: vous ne serez pas en mesure d\'utiliser le mode Basique ou d\'appeler des tâches distantes sur votre environnement actuel. Pour utiliser ce module correctement, vous devez basculer sur une installation en ligne.';
$_MODULE['<{cronjobs}prestashop>cronjobs_035d5cdab2c65ad42b303f8125025160'] = 'Tâches cron';
$_MODULE['<{cronjobs}prestashop>cronjobs_6588952424b58b4c9fc9df026b668991'] = 'Ajouter une nouvelle tâche';
$_MODULE['<{cronjobs}prestashop>cronjobs_d5b84f71f6ffd3152bfcae304f4cf324'] = 'La tâche a été ajoutée.';
$_MODULE['<{cronjobs}prestashop>cronjobs_b4a8f8cb0f74430af046c34a8f4a7dd4'] = 'Une erreur est survenue : La tâche n\'a pas pu être ajoutée.';
$_MODULE['<{cronjobs}prestashop>cronjobs_e038cce99ccc9a523aa201e3e27de0fc'] = 'Cette tâche existe déjà';
$_MODULE['<{cronjobs}prestashop>cronjobs_b85ec3d68e176d94b0f2a9405ddee24b'] = 'La tâche a été mise à jour.';
$_MODULE['<{cronjobs}prestashop>cronjobs_f2b5e497885cc7d0b841f49dbc07754e'] = 'La tâche n\'a pas été mise à jour.';
$_MODULE['<{cronjobs}prestashop>cronjobs_90439f18c853bd247f49e6a1e883da8e'] = 'Le lien cible que vous avez rentré n\'est pas valide. L\'URL doit-être absolue, sur le même domaine que votre boutique.';
$_MODULE['<{cronjobs}prestashop>cronjobs_33eadad95aebb60e67cfccb2fcfa9a9a'] = 'L\'heure choisie n\'est pas valide. La valeur doit-être comprise entre 00:00 et 23:59.';
$_MODULE['<{cronjobs}prestashop>cronjobs_e7dfc672f114367a17143973fcbe8851'] = 'Le jour choisi n\'est pas valide.';
$_MODULE['<{cronjobs}prestashop>cronjobs_dccd5ec41d43db379974d6b25493c9c4'] = 'Le mois choisi n\'est pas valide.';
$_MODULE['<{cronjobs}prestashop>cronjobs_4914bbffb06f6299a6ef641873a818e3'] = 'Le jour de la semaine choisi n\'est pas valide.';
$_MODULE['<{cronjobs}prestashop>cronjobs_0903ea99179b93dfb6e36014d57e10ea'] = 'Une erreur est survenue lors de la connexion avec le web service de gestion des tâches cron de PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobs_c5cc9ba8f1da1e9421f06d0bb56e5784'] = 'Votre tâche cron a bien été enregistrée sur le web service de gestion des tâches cron de PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobs_fe1386ceb6d00ab7ad97cb86a27c00f9'] = 'Votre tâche cron a bien été enregistrée avec le mode Avancé.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_d4169d52732e9ae8df56d2cbcad81a94'] = 'Description de la tâche';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_70d4968bea9a6e76c0333904b9d385e4'] = 'Mettre à jour mes devises';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_0eff773cf33456a033e913f6ed18045c'] = 'Lien cible';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_07045abc579615634804f42bc0b2b4bb'] = 'Entrez une description pour cette tâche.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_43773e69610c99be6c15daa4a2036443'] = 'Définissez le lien de votre tâche cron.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_3a21e2309e8e6aa3759e466154508f2c'] = 'N\'oubliez pas d\'utiliser une URL absolue pour qu\'il soit valide ! Le lien doit également être sur le même domaine que la boutique.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_be938fb8c5582085599dfa95368fb489'] = 'Fréquence de la tâche';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3364fad867d47ca61265fd315e4071e'] = 'À quelle heure la tâche doit-elle être exécutée ?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6c5d30049c4d8d644bd35650be4ac13a'] = 'Quel jour du mois doit-elle être exécutée ?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_a1457ee25ec20fa032d37509b5a90a4e'] = 'Quel mois doit-elle être exécutée ?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_65f768d204a3118f426c756056bef1e1'] = 'Quel jour de la semaine doit-elle être exécutée ?';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b3419e63398ccc41c062f36631bebd9a'] = 'Mode cron';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_972e73b7a882d0802a4e3a16946a2f94'] = 'Basique';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_eaf1dc6d93a18adb2619233d8e99c197'] = 'Utilisez le webservice PrestaShop pour exécuter vos tâches cron.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_9b6545e4cea9b4ad4979d41bb9170e2b'] = 'Avancé';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b6610b26530c9ee3d7bc4a478cf35299'] = 'Pour les utilisateurs expérimentés seulement : utilisez votre propre éditeur de crontab au lieu du webservice pour tâches cron de PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_2257d36bcb68362b24cf74f626bac599'] = 'Le mode avancé vous permet d\'utiliser votre propre éditeur de tâche cron au lieu du webservice PrestaShop.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_94ad8b9f9d516489693dd835cf22bd3b'] = 'Avant tout, vérifiez que la bibliothèque \"curl\" est bien installée sur votre serveur.';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_18028ef85b7ce8fbde749a2c49c6d18a'] = 'Pour exécuter vos tâches cron, veuillez insérer la ligne suivante dans votre éditeur de tâches cron :';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_b55e509c697e4cca0e1d160a7806698f'] = 'Heure';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_03727ac48595a24daed975559c944a44'] = 'Jour';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_e59278675b8f1e052b22b7e5e7d65da7'] = 'Jour de la semaine';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8cebfac3b4821cbc83041f5df54d7730'] = 'Dernière exécution';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_1e3208e0b0d5de9281f88c34169cda6b'] = 'Exécution unique';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activé';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_bdb6ae0d03e6793183349e00f67657f6'] = 'Module - Point d\'accroche';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_02fd27d2951d00b83f111f63611ea863'] = 'Toutes les heures';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_48bf14c419a1d441412510faf39c326d'] = 'Tous les jours';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_8ed91b71d01993965915f3b296c20336'] = 'Tous les mois';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_50875e72e1477618055d1508112199b4'] = 'Tous les jours de la semaine';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_6e7b34fa59e1bd229b207892956dc41c'] = 'Jamais';
$_MODULE['<{cronjobs}prestashop>cronjobsforms_16ed0a7b977ec3bbd23badfb5580d56f'] = 'Tous les jours du mois';
$_MODULE['<{cronjobs}prestashop>configure_27c1f598c2b2b0a8e64424d257e8b398'] = 'Que fait ce module ?';
$_MODULE['<{cronjobs}prestashop>configure_c22203a97c7dd88dd68d1e864d46ee0c'] = 'À l\'origine, cron est un outil du système Unix qui permet de planifier des tâches à un instant donné : vous pouvez créer de nombreuses tâches cron qui seront alors exécutées périodiquement à une heure, date ou intervalle fixé.';
$_MODULE['<{cronjobs}prestashop>configure_d24ca73e026491b9610193f36d5edec8'] = 'Ce module vous fournit un outil cron : vous pouvez créer des tâches qui appelleront un ensemble d\'URL sécurisées sur votre boutique PrestaShop, déclenchant ainsi des mises à jour et autres tâches automatisées.';
$_MODULE['<{cronjobs}prestashop>task_b43ff85c4fc17955aa3ba90827d65430'] = 'N\'oubliez pas d\'utiliser une URL absolue dans le lien cible pour le rendre valide ! Le lien doit aussi être sur le même domaine que la boutique.';
$_MODULE['<{cronjobs}prestashop>form_ef7bd68a02b6b5656554f7a27d1c7bdf'] = 'Erreur !';
$_MODULE['<{cronjobs}prestashop>form_dc3fd488f03d423a04da27ce66274c1b'] = 'Attention !';
$_MODULE['<{cronjobs}prestashop>form_402e7a087747cb56c718bde84651f96a'] = 'Réussite !';

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,94 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{hipay}prestashop>hipay_50089d40ef4536271e8b16dbe5763c01'] = 'HiPay';
$_MODULE['<{hipay}prestashop>hipay_035ab5edb2d8af86d51f6a92e65b4c0f'] = 'Pagamento sicuro con Visa, Mastercard e soluzioni europee.';
$_MODULE['<{hipay}prestashop>hipay_5063b1c7402ff93d09defb875fa0085b'] = '[HiPay] Errore: non è possibile creare PaymentParams';
$_MODULE['<{hipay}prestashop>hipay_a85eba4c6c699122b2bb1387ea4813ad'] = 'Carrello';
$_MODULE['<{hipay}prestashop>hipay_d4126d0b64579211d37151ef9b5af754'] = '[HiPay] Errore: non è possibile creare prodotti \"Carrello\"';
$_MODULE['<{hipay}prestashop>hipay_ac2e397ffc0808f909e9712ca575c121'] = 'Ordine totale';
$_MODULE['<{hipay}prestashop>hipay_0f750bac4745ff32a0c4a4c663ae6b9f'] = '[HiPay] Errore: non può creare l\'Ordine';
$_MODULE['<{hipay}prestashop>hipay_8eafa453be20eba610cc8f5a8170681c'] = '[HiPay] Errore:';
$_MODULE['<{hipay}prestashop>hipay_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configurazione aggiornata';
$_MODULE['<{hipay}prestashop>hipay_0851f7a0844553fa1168718de0f87262'] = 'Non hai i permessi per aprire gli URL esterni (allow_url_fopen)';
$_MODULE['<{hipay}prestashop>hipay_6401593f1412a6b385c8e645d1f056ac'] = 'cURL non è abilitato';
$_MODULE['<{hipay}prestashop>hipay_f8b94463fa8b5591e5edbbb8021e8038'] = 'OpenSSL non è abilitato';
$_MODULE['<{hipay}prestashop>hipay_54457f20f1d9f9d7cf14d8e928cad1aa'] = 'Impossibile accedere al gateway di pagamento';
$_MODULE['<{hipay}prestashop>hipay_527557971b02f68ead6a278fb96ac396'] = 'Controlla il tuo firewall';
$_MODULE['<{hipay}prestashop>hipay_1c5f361b20c116ab2324e28b1ac54e12'] = 'Il tuo negozio non è online';
$_MODULE['<{hipay}prestashop>hipay_c094be5f0a58c5b5cd89d575853f1753'] = 'Le categorie HiPay non sono definite per ogni ID di sito';
$_MODULE['<{hipay}prestashop>hipay_1a1a01512e42b64541ed9b1f43a56036'] = 'Impossibile recuperare categorie HiPay. Consulta il log degli errori per ulteriori dettagli.';
$_MODULE['<{hipay}prestashop>hipay_67446b8dbb67e3bc5d7dffc93eb54d47'] = 'La soluzione di pagamento multimedia rapida e semplice per tutti in francia e Europa!';
$_MODULE['<{hipay}prestashop>hipay_f6f26dd813e62c21df052803bfe54e5e'] = 'Grazie alla sua adattabilità e le sue prestazioni, HiPay conta già più di 12000 mercanti e 1 milione di utilizzatori. Il suo insieme di 15 delle soluzioni di pagamento le più efficaci in Europa offre ai tuoi clienti un riconscimento immediato e una garanzia rassicurante per le loro habitudine di consumo.';
$_MODULE['<{hipay}prestashop>hipay_47c4a16c7d291988859e09b9b70bf482'] = 'Una volta il tuo account attivato riceverai maggiori dettagli via email.';
$_MODULE['<{hipay}prestashop>hipay_a0186b7260c92016ec7000ae73099852'] = 'Tutti i mercanti che usano PrestaShop possono beneficiare di prezzi speciali inviando un email all\'indirizio seguente:';
$_MODULE['<{hipay}prestashop>hipay_c21f22cda787436117c0414ed66c1580'] = 'Non esitare a contattarci. I prezzi possono scendere del 50%.';
$_MODULE['<{hipay}prestashop>hipay_92c1bf869a86b76d878e356976954948'] = 'HiPay aumenta le tue vendite in tutta Europa grazie a:';
$_MODULE['<{hipay}prestashop>hipay_6022f8df59810e811923f93c5ccd1df8'] = 'Soluzioni di pagamento specifiche a ogni paese europeo;';
$_MODULE['<{hipay}prestashop>hipay_00c73592d291d0436059c671342a4381'] = 'Nessun costo di iscrizione o di installazione;';
$_MODULE['<{hipay}prestashop>hipay_470bdbbb630bea0c16bfe54995199e82'] = 'Contatti con un esperienza estensiva dei problemi tecnici e finanziari;';
$_MODULE['<{hipay}prestashop>hipay_4b7d2fe7b1fd51743339baecf698d7e5'] = 'Servizio clienti dedicato';
$_MODULE['<{hipay}prestashop>hipay_5d0f085c7daf9e1c05e4b4eb0ef928a3'] = 'Sistema anti-frode e monitoraggio permanente per il comportamento ad alto rischio';
$_MODULE['<{hipay}prestashop>hipay_e196e94726a3f1086d5ab95858517dba'] = 'HiPay fa parte del gruppo Hi-Media (Allopass).';
$_MODULE['<{hipay}prestashop>hipay_7e5b4f84e3fafbbef48a26808664ee47'] = 'È possibile ottenere una guida in PDF per configurare Hipay su Prestashop';
$_MODULE['<{hipay}prestashop>hipay_254f642527b45bc260048e30704edb39'] = 'Configurazione';
$_MODULE['<{hipay}prestashop>hipay_d86590564b22be4d3b242472722bf969'] = 'La configurazione di HiPay è molto semplice e viene eseguita in 3 passi';
$_MODULE['<{hipay}prestashop>hipay_c7c709e6ecb7c104faa16a7d123572bf'] = 'Account creato!';
$_MODULE['<{hipay}prestashop>hipay_f21850b58e4866b30f7d3724cc29edb1'] = 'Accedi al tuo account commerciante';
$_MODULE['<{hipay}prestashop>hipay_dc32882bf2b1893d53aeaaa862c46d5c'] = 'Crea un account hiPay';
$_MODULE['<{hipay}prestashop>hipay_3cf6ff195f05281447a991884ffd6685'] = 'Se hai già un account passa direttamente alla tappa 2.';
$_MODULE['<{hipay}prestashop>hipay_1e884e3078d9978e216a027ecd57fb34'] = 'Email';
$_MODULE['<{hipay}prestashop>hipay_04176f095283bc729f1e3926967e7034'] = 'Nome';
$_MODULE['<{hipay}prestashop>hipay_dff4bf10409100d989495c6d5486035e'] = 'Cognome';
$_MODULE['<{hipay}prestashop>hipay_386c339d37e737a436499d423a77df0c'] = 'Valuta';
$_MODULE['<{hipay}prestashop>hipay_3e823fac7473e42888932c7761c224fc'] = 'Euro';
$_MODULE['<{hipay}prestashop>hipay_34553e70d0f619c5c359d67350a80216'] = 'Dollaro Canadese';
$_MODULE['<{hipay}prestashop>hipay_e43faec271a99a8b04591bcdef923acf'] = 'Dollaro US';
$_MODULE['<{hipay}prestashop>hipay_c0461926e49792dabc964a331f075e5b'] = 'Franco Svizzero';
$_MODULE['<{hipay}prestashop>hipay_f306cf9973b9e7522caef12f9e4291e1'] = 'Dollaro Australiano';
$_MODULE['<{hipay}prestashop>hipay_5575b949f9e173dae88b2047c2608630'] = 'Sterlina Inglese';
$_MODULE['<{hipay}prestashop>hipay_34e5424bb597f2073f28049495cb1c48'] = 'Krona Svedese';
$_MODULE['<{hipay}prestashop>hipay_1aebee5bc23ed0aaccebbd27d81c5954'] = 'Linea di business';
$_MODULE['<{hipay}prestashop>hipay_6df037a9e406ccfe2a6839641472234f'] = 'Tema del website';
$_MODULE['<{hipay}prestashop>hipay_f3ce7d6df07762bf6ae3ee7b58dee9c9'] = 'Email di contatto del website';
$_MODULE['<{hipay}prestashop>hipay_004779b951f00aa5f78bdbe74ec1a047'] = 'Nome del website';
$_MODULE['<{hipay}prestashop>hipay_2a84bf35647baabac3934127aed63dbe'] = 'URL del website';
$_MODULE['<{hipay}prestashop>hipay_ad408dab2f6f89775e2db1bfd2d01311'] = 'Password mercante del website';
$_MODULE['<{hipay}prestashop>hipay_854348e0cffd068204ce979351b2eb10'] = 'Attivare la soluzione HiPay nel vostro Prestashop, è gratis!';
$_MODULE['<{hipay}prestashop>hipay_d08cf8ae06cc7e3151aad4618c6efe3a'] = 'Configurazione in';
$_MODULE['<{hipay}prestashop>hipay_0f26e4f64d58beb4d924627c707e43ad'] = 'Numero di account';
$_MODULE['<{hipay}prestashop>hipay_315f3c78ea54c8dadb082acc328dd5bd'] = 'Password commerciante';
$_MODULE['<{hipay}prestashop>hipay_b250a007769c7ffe655c74cfb8176b8c'] = 'ID sito';
$_MODULE['<{hipay}prestashop>hipay_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Categoria';
$_MODULE['<{hipay}prestashop>hipay_4de3b490bff03a1e715d142cdd41d3f4'] = 'Gruppo di età autorizzato';
$_MODULE['<{hipay}prestashop>hipay_a19a3f71c627a4bde1e016a46f313799'] = 'Per tutte le età';
$_MODULE['<{hipay}prestashop>hipay_1ddfab06495a5d2dfcf174034546502d'] = 'Per 12 anni e oltre';
$_MODULE['<{hipay}prestashop>hipay_524fefef83fd5b0b82292a5366b40cd2'] = 'Per 16 anni e oltre';
$_MODULE['<{hipay}prestashop>hipay_4f47a2eb5f2af6c1419baa17794e5f03'] = 'Per 18 anni e oltre';
$_MODULE['<{hipay}prestashop>hipay_0d10a9cae9827e30b09913c1ec6ef2db'] = 'Nota: verificare che la modalità di valuta che hai scelto nella scheda di pagamento sia compatibile con il tuo/i tuoi account HiPay.';
$_MODULE['<{hipay}prestashop>hipay_c80a51a60c5ee43553c3881459b8f431'] = 'Aggiorna la configurazione';
$_MODULE['<{hipay}prestashop>hipay_ff9a7c1c46a42355ad67faaef66ad1fa'] = 'Scegli un insieme di bottoni per il tuo negozio HiPay';
$_MODULE['<{hipay}prestashop>hipay_e13074ee37ba40a9a412a957b02e42f8'] = 'Zone di restrizione';
$_MODULE['<{hipay}prestashop>hipay_c6eb6bc44fbc78b79cc40f8012eb7634'] = 'Selezionare le zone di consegna autorizzate';
$_MODULE['<{hipay}prestashop>hipay_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{hipay}prestashop>hipay_dad1f8d794ee0dd7753fe75e73b78f31'] = 'Zone';
$_MODULE['<{hipay}prestashop>hipay_646ac4a2df12eae08dd8e3e749fd9daa'] = 'Aggiorna le zone';
$_MODULE['<{hipay}prestashop>hipay_403057d4abdd32b22a73de245b4e5282'] = 'Connessione all\'host non riuscita';
$_MODULE['<{hipay}prestashop>hipay_2bfb754d61211599fa25fc5dc0e75a02'] = 'Esiste già un account con questo indirizzo email';
$_MODULE['<{hipay}prestashop>hipay_342f5c77ed008542e78094607ce1f7f3'] = 'nome';
$_MODULE['<{hipay}prestashop>hipay_8ad75c5a8821cc294f189181722acb56'] = 'cognome';
$_MODULE['<{hipay}prestashop>hipay_0c83f57c786a0b4a39efab23731c7ebc'] = 'email';
$_MODULE['<{hipay}prestashop>hipay_1af0389838508d7016a9841eb6273962'] = 'valuta';
$_MODULE['<{hipay}prestashop>hipay_05929b058aa460bfa784ab9895379f4c'] = 'linea di business';
$_MODULE['<{hipay}prestashop>hipay_878cf106f4ffc3095f3a583c8ed04990'] = 'soggetto del website';
$_MODULE['<{hipay}prestashop>hipay_bac16fca307f0fe55e318a3bcc5a171d'] = 'email di contatto del website';
$_MODULE['<{hipay}prestashop>hipay_ca75dc95767c2d020aba7b02bb2837c8'] = 'nome del website';
$_MODULE['<{hipay}prestashop>hipay_eab5fd4c5144c24cb4494684dd15e952'] = 'url del website';
$_MODULE['<{hipay}prestashop>hipay_fa4aaa6b8b3825e2cad3ad8c44086207'] = 'password mercante del website';
$_MODULE['<{hipay}prestashop>hipay_6a8d50e3e8fb5a4c990e0b6175cc6b0d'] = 'Alcuni campi non sono esatti. Si prega di verificare i campi: %s';
$_MODULE['<{hipay}prestashop>hipay_581d72b595ff53d07c0ab6894f388733'] = 'Un errore si è verificato durante la creazione dell\'account';
$_MODULE['<{hipay}prestashop>hipay_d9ad794fc993784fa7442cce33384535'] = 'Errore sconosciuto.';
$_MODULE['<{hipay}prestashop>payment_cb047ebd77ec02c36fbac405f8c9922c'] = 'Paga con Hipay (Pagamento sicuro con Visa, Mastercard e soluzioni europee)';
$_MODULE['<{hipay}prestashop>payment_35d5d65e0fb908f81b8c36820ddd7cc6'] = 'importo minimo richiesto per pagare con HiPay:';
$_MODULE['<{hipay}prestashop>payment_e755d43d98e3d597b4492d2e6493ffed'] = '(Sandbox / modalità di prova)';

View File

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,38 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_0_6($module)
{
if (Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.$module->name.'` LIKE \'one_shot\'') == false) {
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.$module->name.'` ADD `one_shot` BOOLEAN NOT NULL DEFAULT 0 AFTER `updated_at`');
}
return $module;
}

7
modules/cronjobs/vendor/autoload.php vendored Normal file
View File

@@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit4c1e45d166700396b61ece8c1491fb0a::getLoader();

View File

@@ -0,0 +1,445 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

View File

@@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
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 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.

View File

@@ -0,0 +1,9 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,52 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit4c1e45d166700396b61ece8c1491fb0a
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit4c1e45d166700396b61ece8c1491fb0a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit4c1e45d166700396b61ece8c1491fb0a', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4c1e45d166700396b61ece8c1491fb0a::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}

View File

@@ -0,0 +1,15 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit4c1e45d166700396b61ece8c1491fb0a
{
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
}, null, ClassLoader::class);
}
}

View File

@@ -0,0 +1 @@
[]

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,65 @@
#content {
margin: 20px;
}
#cronjobs_toolbar {
margin-top: 20px !important;
}
#cronjobs-logo {
margin: 6px 15px 3px 0;
}
.alert {
border-left: 1px solid;
border-right: 1px solid;
}
.alert-warning {
border: 1px solid #9e6014 !important;
background: #FEEFB3 !important;
}
.alert-info {
border: 1px solid #00529B !important;
background: #BDE5F8 !important;
}
.alert-success {
border: 1px solid #4F8A10 !important;
background: #DFF2BF !important;
}
.panel {
padding: 15px;
border: 1px solid #eee;
text-align: justify;
}
.panel h3 {
margin-top: 0;
}
.margin-form label {
text-align: left;
margin-bottom: 0;
padding-top: 2px;
line-height: 20px;
float: none !important;
}
.margin-form input {
margin: 5px 5px 0 0;
vertical-align: top;
}
.bootstrap form .tab-pane:first-child .panel {
border-top-left-radius: 0;
}
.bootstrap #cronjobs-logo {
margin-right: 4px;
}
input[name="task"] {
width: 80%;
}

View File

@@ -0,0 +1,6 @@
.bootstrap form .tab-pane:first-child .panel {
border-top-left-radius: 0;
}
.bootstrap #cronjobs-logo {
margin-right: 4px;
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,64 @@
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 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="defaultForm"}
{if (isset($form_errors)) && (count($form_errors) > 0)}
<div class="alert alert-danger">
<h4>{l s='Error!' mod='cronjobs'}</h4>
<ul class="list-unstyled">
{foreach from=$form_errors item='message'}
<li>{$message|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
</div>
{/if}
{if (isset($form_infos)) && (count($form_infos) > 0)}
<div class="alert alert-warning">
<h4>{l s='Warning!' mod='cronjobs'}</h4>
<ul class="list-unstyled">
{foreach from=$form_infos item='message'}
<li>{$message|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
</div>
{/if}
{if (isset($form_successes)) && (count($form_successes) > 0)}
<div class="alert alert-success">
<h4>{l s='Success!' mod='cronjobs'}</h4>
<ul class="list-unstyled">
{foreach from=$form_successes item='message'}
<li>{$message|escape:'htmlall':'UTF-8'}</li>
{/foreach}
</ul>
</div>
{/if}
{$smarty.block.parent}
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,34 @@
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<h3>{l s='What does this module do?' mod='cronjobs'}</h3>
<p>
<img src="{$module_dir|escape}/logo.png" class="pull-left" id="cronjobs-logo" />
{l s='Originally, cron is a Unix system tool that provides time-based job scheduling: you can create many cron jobs, which are then run periodically at fixed times, dates, or intervals.' mod='cronjobs'}
<br/>
{l s='This module provides you with a cron-like tool: you can create jobs which will call a given set of secure URLs to your PrestaShop store, thus triggering updates and other automated tasks.' mod='cronjobs'}
</p>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,31 @@
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
<h3>Reminder</h3>
<p>
{l s='Do not forget to use an absolute URL in the target link to make it valid! The link also has to be on the same domain as the shop.' mod='cronjobs'}
</p>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;