| @@ 124-138 (lines=15) @@ | ||
| 121 | $form->display(); |
|
| 122 | } |
|
| 123 | break; |
|
| 124 | case 'delete_attachment': |
|
| 125 | $attachmentObj = $helper->getHandler('Attachment')->get($attachment_id); |
|
| 126 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 127 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 128 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 129 | } |
|
| 130 | if ($helper->getHandler('Attachment')->delete($attachmentObj)) { |
|
| 131 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 132 | } else { |
|
| 133 | echo $attachmentObj->getHtmlErrors(); |
|
| 134 | } |
|
| 135 | } else { |
|
| 136 | xoops_confirm(['ok' => true, 'attachment_id' => $attachment_id, 'op' => 'delete_attachment'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $attachmentObj->getVar('attachment_letter_id'))); |
|
| 137 | } |
|
| 138 | break; |
|
| 139 | } |
|
| 140 | ||
| 141 | require_once __DIR__ . '/admin_footer.php'; |
|
| @@ 370-384 (lines=15) @@ | ||
| 367 | $form = $bmhObj->getForm(); |
|
| 368 | $form->display(); |
|
| 369 | break; |
|
| 370 | case 'delete_bmh': |
|
| 371 | $bmhObj = $helper->getHandler('Bmh')->get($bmh_id); |
|
| 372 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 373 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 374 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 375 | } |
|
| 376 | if ($helper->getHandler('Bmh')->delete($bmhObj)) { |
|
| 377 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 378 | } else { |
|
| 379 | echo $bmhObj->getHtmlErrors(); |
|
| 380 | } |
|
| 381 | } else { |
|
| 382 | xoops_confirm(['ok' => true, 'bmh_id' => $bmh_id, 'op' => 'delete_bmh'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $bmhObj->getVar('bmh_rule_no'))); |
|
| 383 | } |
|
| 384 | break; |
|
| 385 | } |
|
| 386 | require_once __DIR__ . '/admin_footer.php'; |
|
| 387 | ||
| @@ 219-233 (lines=15) @@ | ||
| 216 | $form = $catObj->getForm(); |
|
| 217 | $form->display(); |
|
| 218 | break; |
|
| 219 | case 'delete_cat': |
|
| 220 | $catObj = $helper->getHandler('Cat')->get($_REQUEST['cat_id']); |
|
| 221 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 222 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 223 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 224 | } |
|
| 225 | if ($helper->getHandler('Cat')->delete($catObj)) { |
|
| 226 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 227 | } else { |
|
| 228 | echo $catObj->getHtmlErrors(); |
|
| 229 | } |
|
| 230 | } else { |
|
| 231 | xoops_confirm(['ok' => true, 'cat_id' => $cat_id, 'op' => 'delete_cat'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $catObj->getVar('cat_name'))); |
|
| 232 | } |
|
| 233 | break; |
|
| 234 | } |
|
| 235 | require_once __DIR__ . '/admin_footer.php'; |
|
| 236 | ||
| @@ 142-160 (lines=19) @@ | ||
| 139 | $form = $mailinglistObj->getForm(); |
|
| 140 | $form->display(); |
|
| 141 | break; |
|
| 142 | case 'delete_mailinglist': |
|
| 143 | $mailinglistObj = $helper->getHandler('Mailinglist')->get($_REQUEST['mailinglist_id']); |
|
| 144 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 145 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 146 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 147 | } |
|
| 148 | if ($helper->getHandler('Mailinglist')->delete($mailinglistObj)) { |
|
| 149 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 150 | } else { |
|
| 151 | echo $mailinglistObj->getHtmlErrors(); |
|
| 152 | } |
|
| 153 | } else { |
|
| 154 | xoops_confirm([ |
|
| 155 | 'ok' => true, |
|
| 156 | 'mailinglist_id' => $_REQUEST['mailinglist_id'], |
|
| 157 | 'op' => 'delete_mailinglist', |
|
| 158 | ], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $mailinglistObj->getVar('mailinglist_email'))); |
|
| 159 | } |
|
| 160 | break; |
|
| 161 | } |
|
| 162 | require_once __DIR__ . '/admin_footer.php'; |
|
| 163 | ||
| @@ 281-295 (lines=15) @@ | ||
| 278 | $form = $protocolObj->getForm(); |
|
| 279 | $form->display(); |
|
| 280 | break; |
|
| 281 | case 'delete_protocol': |
|
| 282 | $protocolObj = $helper->getHandler('Protocol')->get($_REQUEST['protocol_id']); |
|
| 283 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 284 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 285 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 286 | } |
|
| 287 | if ($helper->getHandler('Protocol')->delete($protocolObj)) { |
|
| 288 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 289 | } else { |
|
| 290 | echo $protocolObj->getHtmlErrors(); |
|
| 291 | } |
|
| 292 | } else { |
|
| 293 | xoops_confirm(['ok' => true, 'protocol_id' => $_REQUEST['protocol_id'], 'op' => 'delete_protocol'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $protocolObj->getVar('protocol_id'))); |
|
| 294 | } |
|
| 295 | break; |
|
| 296 | case 'delete_protocol_list': |
|
| 297 | $letter_id = \Xmf\Request::getInt('letter_id', 0, 'REQUEST'); |
|
| 298 | if ($letter_id > 0) { |
|
| @@ 362-377 (lines=16) @@ | ||
| 359 | $form = $subscrObj->getFormAdmin(); |
|
| 360 | $form->display(); |
|
| 361 | break; |
|
| 362 | case 'delete_subscr': |
|
| 363 | $subscrObj = $helper->getHandler('Subscr')->get($subscr_id); |
|
| 364 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 365 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 366 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 367 | } |
|
| 368 | // delete subscriber (subscr), subscriptions (catsubscrs) and mailinglist |
|
| 369 | if ($helper->getHandler('Subscr')->delete($subscrObj)) { |
|
| 370 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 371 | } else { |
|
| 372 | echo $subscrObj->getHtmlErrors(); |
|
| 373 | } |
|
| 374 | } else { |
|
| 375 | xoops_confirm(['ok' => true, 'subscr_id' => $_REQUEST['subscr_id'], 'op' => 'delete_subscr'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $subscrObj->getVar('subscr_email'))); |
|
| 376 | } |
|
| 377 | break; |
|
| 378 | } |
|
| 379 | require_once __DIR__ . '/admin_footer.php'; |
|
| 380 | ||
| @@ 90-104 (lines=15) @@ | ||
| 87 | } |
|
| 88 | echo '</table><br><br>'; |
|
| 89 | break; |
|
| 90 | case 'delete_task': |
|
| 91 | $taskObj = $helper->getHandler('Task')->get($_REQUEST['task_id']); |
|
| 92 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 93 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 94 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 95 | } |
|
| 96 | if ($helper->getHandler('Task')->delete($taskObj)) { |
|
| 97 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 98 | } else { |
|
| 99 | echo $taskObj->getHtmlErrors(); |
|
| 100 | } |
|
| 101 | } else { |
|
| 102 | xoops_confirm(['ok' => true, 'task_id' => $_REQUEST['task_id'], 'op' => 'delete_task'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $taskObj->getVar('task'))); |
|
| 103 | } |
|
| 104 | break; |
|
| 105 | } |
|
| 106 | require_once __DIR__ . '/admin_footer.php'; |
|
| 107 | ||
| @@ 135-149 (lines=15) @@ | ||
| 132 | $form = $templateObj->getForm(); |
|
| 133 | $form->display(); |
|
| 134 | break; |
|
| 135 | case 'delete_template': |
|
| 136 | $templateObj = $helper->getHandler('Template')->get($template_id); |
|
| 137 | if (true === \Xmf\Request::getBool('ok', false, 'POST')) { |
|
| 138 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 139 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 140 | } |
|
| 141 | if ($helper->getHandler('Template')->delete($templateObj)) { |
|
| 142 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELOK); |
|
| 143 | } else { |
|
| 144 | echo $obj->getHtmlErrors(); |
|
| 145 | } |
|
| 146 | } else { |
|
| 147 | xoops_confirm(['ok' => true, 'template_id' => $template_id, 'op' => 'delete_template'], $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $templateObj->getVar('template_title'))); |
|
| 148 | } |
|
| 149 | break; |
|
| 150 | } |
|
| 151 | require_once __DIR__ . '/admin_footer.php'; |
|
| 152 | ||