37 lines
780 B
PHP
Executable File
37 lines
780 B
PHP
Executable File
<?php
|
|
|
|
require_once (dirname(__file__) . '/../../../config/config.inc.php');
|
|
require_once (dirname(__file__) . '/../../../init.php');
|
|
require_once (dirname(__file__) . '/../marques.php');
|
|
|
|
if (!defined('_PS_VERSION_')) {
|
|
exit;
|
|
}
|
|
|
|
$id_lang = Tools::getValue('id_lang');
|
|
if ($id_lang) {
|
|
Context::getContext()->language->iso_code = $id_lang;
|
|
}
|
|
|
|
$action = Tools::getValue('action');
|
|
$file = Tools::getValue('file');
|
|
$id = Tools::getValue('id');
|
|
|
|
$output = "";
|
|
|
|
if (!$file || !$action) {
|
|
die($output);
|
|
}
|
|
switch ($action) {
|
|
case 'suppMarque':
|
|
unlink(dirname(__FILE__).'/../img/'.$file);
|
|
$info = MarquesInfo::getMarqueInfo($file);
|
|
$info->delete();
|
|
$output = '{"error":false}';
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
echo $output;
|
|
|
|
?>
|