Files
2019-11-17 19:14:07 +01:00

49 lines
1.3 KiB
PHP

<?php
/**
* 2008-today Mediacom87
*
* NOTICE OF LICENSE
*
* Read in the module
*
* @author Mediacom87 <support@mediacom87.net>
* @copyright 2008-2016 Mediacom87
* @license define in the module
*/
if (!defined('_PS_ADMIN_DIR_')) {
define('_PS_ADMIN_DIR_', getcwd());
}
if (!defined('PS_ADMIN_DIR')) {
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_);
}
include dirname(__FILE__).'/../../config/config.inc.php';
include dirname(__FILE__).'/medtnttrackingparcel.php';
$module = Module::getInstanceByName('medtnttrackingparcel');
if (Validate::isLoadedObject($module) && $module->active) {
if (Tools::getIsset('sk')) {
$secure_key = $module->conf['SECURITY'];
if (!empty($secure_key) && $secure_key === Tools::getValue('sk')) {
if (!Tools::getIsset('f')) {
$filename = _PS_MODULE_DIR_ . $module->name . '/datas';
if (file_exists($filename) && is_file($filename)) {
unlink($filename);
}
}
echo $module->trackParcels();
die('<p>Tracking : OK</p>');
} else {
die('Wrong or empty Security Key') ;
}
} else {
die('Security key is missing');
}
} else {
die('This module is not activated');
}