23 lines
544 B
PHP
23 lines
544 B
PHP
<?php
|
|
/**
|
|
* 2014 - 2017 MDWeb - Terms of Sale Send
|
|
*
|
|
* @author MDWeb
|
|
* @version 1.3.0
|
|
* @copyright MDWeb 2014 - 2017
|
|
* @license Commerciale
|
|
*/
|
|
|
|
require ('../../config/config.inc.php');
|
|
/* Gestion de la suppression d'un fichier PDF en AJAX */
|
|
if (Tools::getIsset('pdf'))
|
|
{
|
|
$pdf = Tools::getValue('pdf');
|
|
$sql = 'DELETE FROM '._DB_PREFIX_.'mdtossend WHERE filename = \''.$pdf.'\';';
|
|
$test = Db::getInstance()->execute($sql);
|
|
if (!unlink( _PS_ROOT_DIR_.'/modules/mdtossend/pdf/'.$pdf))
|
|
echo 'false';
|
|
else
|
|
echo 'true';
|
|
}
|