@@ 411-429 (lines=19) @@ | ||
408 | break; |
|
409 | ||
410 | // **************************************************************************************************************** |
|
411 | case 'deletearticles': // Suppression d'un article |
|
412 | // **************************************************************************************************************** |
|
413 | xoops_cp_header(); |
|
414 | $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
415 | if (empty($id)) { |
|
416 | references_utils::redirect(_AM_REFERENCES_ERROR_1, $baseurl, 5); |
|
417 | } |
|
418 | $opRedirect = 'articles'; |
|
419 | $item = null; |
|
420 | $item = $h_references_articles->get($id); |
|
421 | if (is_object($item)) { |
|
422 | $res = $h_references_articles->deleteArticle($item, true); |
|
423 | if ($res) { |
|
424 | references_utils::updateCache(); |
|
425 | references_utils::redirect(_AM_REFERENCES_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2); |
|
426 | } |
|
427 | } |
|
428 | references_utils::redirect(_AM_REFERENCES_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5); |
|
429 | break; |
|
430 | ||
431 | // **************************************************************************************************************** |
|
432 | case 'instant-zero'; // Publicit??? |
|
@@ 665-683 (lines=19) @@ | ||
662 | break; |
|
663 | ||
664 | // **************************************************************************************************************** |
|
665 | case 'deletecategories': // Suppression d'une cat???gorie |
|
666 | // **************************************************************************************************************** |
|
667 | xoops_cp_header(); |
|
668 | $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
669 | if (empty($id)) { |
|
670 | references_utils::redirect(_AM_REFERENCES_ERROR_1, $baseurl, 5); |
|
671 | } |
|
672 | $opRedirect = 'categories'; |
|
673 | $item = null; |
|
674 | $item = $h_references_categories->get($id); |
|
675 | if (is_object($item)) { |
|
676 | $res = $h_references_categories->delete($item, true); |
|
677 | if ($res) { |
|
678 | references_utils::updateCache(); |
|
679 | references_utils::redirect(_AM_REFERENCES_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2); |
|
680 | } |
|
681 | } |
|
682 | references_utils::redirect(_AM_REFERENCES_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5); |
|
683 | break; |
|
684 | ||
685 | // **************************************************************************************************************** |
|
686 | case 'autocomplete': // Ajax, autocompl???tion |