@@ 332-350 (lines=19) @@ | ||
329 | $form->display(); |
|
330 | break; |
|
331 | ||
332 | case 'delete': |
|
333 | $customerObject = $customerHandler->get(Request::getString('id', '')); |
|
334 | if (1 == Request::getInt('ok', 0)) { |
|
335 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
336 | redirect_header('customer.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
|
337 | } |
|
338 | if ($customerHandler->delete($customerObject)) { |
|
339 | redirect_header('customer.php', 3, AM_EQUIPMENT_FORMDELOK); |
|
340 | } else { |
|
341 | echo $customerObject->getHtmlErrors(); |
|
342 | } |
|
343 | } else { |
|
344 | xoops_confirm(array( |
|
345 | 'ok' => 1, |
|
346 | 'id' => Request::getString('id', ''), |
|
347 | 'op' => 'delete' |
|
348 | ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $customerObject->getVar('last'))); |
|
349 | } |
|
350 | break; |
|
351 | ||
352 | case 'clone': |
|
353 |
@@ 347-365 (lines=19) @@ | ||
344 | $form->display(); |
|
345 | break; |
|
346 | ||
347 | case 'delete': |
|
348 | $equipmentObject = $equipmentHandler->get(Request::getString('id', '')); |
|
349 | if (1 == Request::getInt('ok', 0)) { |
|
350 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
351 | redirect_header('equipment.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
|
352 | } |
|
353 | if ($equipmentHandler->delete($equipmentObject)) { |
|
354 | redirect_header('equipment.php', 3, AM_EQUIPMENT_FORMDELOK); |
|
355 | } else { |
|
356 | echo $equipmentObject->getHtmlErrors(); |
|
357 | } |
|
358 | } else { |
|
359 | xoops_confirm(array( |
|
360 | 'ok' => 1, |
|
361 | 'id' => Request::getString('id', ''), |
|
362 | 'op' => 'delete' |
|
363 | ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $equipmentObject->getVar('name'))); |
|
364 | } |
|
365 | break; |
|
366 | ||
367 | case 'clone': |
|
368 |
@@ 213-231 (lines=19) @@ | ||
210 | $form->display(); |
|
211 | break; |
|
212 | ||
213 | case 'delete': |
|
214 | $rentalsObject = $rentalsHandler->get(Request::getString('id', '')); |
|
215 | if (1 == Request::getInt('ok', 0)) { |
|
216 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
217 | redirect_header('rentals.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
|
218 | } |
|
219 | if ($rentalsHandler->delete($rentalsObject)) { |
|
220 | redirect_header('rentals.php', 3, AM_EQUIPMENT_FORMDELOK); |
|
221 | } else { |
|
222 | echo $rentalsObject->getHtmlErrors(); |
|
223 | } |
|
224 | } else { |
|
225 | xoops_confirm(array( |
|
226 | 'ok' => 1, |
|
227 | 'id' => Request::getString('id', ''), |
|
228 | 'op' => 'delete' |
|
229 | ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $rentalsObject->getVar('customerid'))); |
|
230 | } |
|
231 | break; |
|
232 | ||
233 | case 'clone': |
|
234 |