| @@ 156-169 (lines=14) @@ | ||
| 153 | break; |
|
| 154 | ||
| 155 | // **************************************************************************************************************** |
|
| 156 | case 'delete': // Suppression d'une commande |
|
| 157 | // **************************************************************************************************************** |
|
| 158 | xoops_cp_header(); |
|
| 159 | $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
| 160 | if ($id == 0) { |
|
| 161 | OledrionUtility::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5); |
|
| 162 | } |
|
| 163 | $item = $h_oledrion_commands->get($id); |
|
| 164 | if (is_object($item)) { |
|
| 165 | xoops_confirm(array('op' => 'orders', 'action' => 'remove', 'id' => $id), 'index.php', _AM_OLEDRION_CONF_DELITEM); |
|
| 166 | } else { |
|
| 167 | OledrionUtility::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5); |
|
| 168 | } |
|
| 169 | break; |
|
| 170 | ||
| 171 | // **************************************************************************************************************** |
|
| 172 | case 'remove': // Suppression effective d'une commande |
|
| @@ 869-882 (lines=14) @@ | ||
| 866 | break; |
|
| 867 | ||
| 868 | // **************************************************************************************************************** |
|
| 869 | case 'confdelete': // Confirmation de la suppression d'un produit |
|
| 870 | // **************************************************************************************************************** |
|
| 871 | xoops_cp_header(); |
|
| 872 | ||
| 873 | $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
| 874 | if ($id == 0) { |
|
| 875 | OledrionUtility::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5); |
|
| 876 | } |
|
| 877 | $item = $h_oledrion_products->get($id); |
|
| 878 | if (!is_object($item)) { |
|
| 879 | OledrionUtility::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl, 5); |
|
| 880 | } |
|
| 881 | xoops_confirm(array('op' => 'products', 'action' => 'delete', 'id' => $id), 'index.php', _AM_OLEDRION_CONF_DELITEM . '<br>' . $item->getVar('product_title')); |
|
| 882 | break; |
|
| 883 | ||
| 884 | // **************************************************************************************************************** |
|
| 885 | case 'delete': // Suppression d'un produit |
|