mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-23 05:54:03 +01:00
Fix sulla procedura di eliminazione categorie
This commit is contained in:
parent
0bb3e9cb74
commit
4550e55c2d
@ -80,14 +80,15 @@ include_once __DIR__.'/../../core.php';
|
||||
<?php
|
||||
|
||||
$res = $dbo->fetchNum('SELECT * FROM `mg_articoli` WHERE `id_categoria`='.prepare($id).' OR `id_sottocategoria`='.prepare($id).' OR `id_sottocategoria` IN (SELECT id FROM `mg_categorie` WHERE `parent`='.prepare($id).')');
|
||||
|
||||
if ($res) {
|
||||
echo '
|
||||
<a class="btn btn-danger ask" data-backto="record-list">
|
||||
<i class="fa fa-trash"></i> '.tr('Elimina').'
|
||||
</a>';
|
||||
} else {
|
||||
echo '
|
||||
<div class="alert alert-danger">
|
||||
<p>'.tr('Esistono ancora alcuni articoli sotto questa categoria!').'</p>
|
||||
</div>';
|
||||
} else {
|
||||
echo '
|
||||
<a class="btn btn-danger ask" data-backto="record-list">
|
||||
<i class="fa fa-trash"></i> '.tr('Elimina').'
|
||||
</a>';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user