|
100 | 100 | ]); |
101 | 101 |
|
102 | 102 | if ($result['domain'] != '') { |
103 | | - if (isset($_POST['send']) && $_POST['send'] == 'send' && $alias_check['count'] == 0) { |
| 103 | + if (Request::post('send') == 'send' && $alias_check['count'] == 0) { |
104 | 104 | try { |
105 | | - Domains::getLocal($userinfo, $_POST)->delete(); |
| 105 | + Domains::getLocal($userinfo, Request::postAll())->delete(); |
106 | 106 | } catch (Exception $e) { |
107 | 107 | Response::dynamicError($e->getMessage()); |
108 | 108 | } |
|
113 | 113 | } elseif ($alias_check['count'] > 0) { |
114 | 114 | Response::standardError('domains_cantdeletedomainwithaliases'); |
115 | 115 | } else { |
116 | | - HTML::askYesNo('admin_domain_reallydelete', $filename, [ |
| 116 | + HTML::askYesNoWithCheckbox('admin_domain_reallydelete', 'admin_customer_alsoremovemail', $filename, [ |
117 | 117 | 'id' => $id, |
118 | 118 | 'page' => $page, |
119 | 119 | 'action' => $action |
120 | 120 | ], $idna_convert->decode($result['domain'])); |
121 | 121 | } |
122 | 122 | } |
123 | 123 | } elseif ($action == 'add') { |
124 | | - if (isset($_POST['send']) && $_POST['send'] == 'send') { |
| 124 | + if (Request::post('send') == 'send') { |
125 | 125 | try { |
126 | | - Domains::getLocal($userinfo, $_POST)->add(); |
| 126 | + Domains::getLocal($userinfo, Request::postAll())->add(); |
127 | 127 | } catch (Exception $e) { |
128 | 128 | Response::dynamicError($e->getMessage()); |
129 | 129 | } |
|
355 | 355 | $usedips[] = $ipsresultrow['id_ipandports']; |
356 | 356 | } |
357 | 357 |
|
358 | | - if (isset($_POST['send']) && $_POST['send'] == 'send') { |
| 358 | + if (Request::post('send') == 'send') { |
359 | 359 | try { |
360 | 360 | // remove ssl ip/ports if set is empty |
361 | | - if (!isset($_POST['ssl_ipandport']) || empty($_POST['ssl_ipandport'])) { |
| 361 | + if (empty(Request::post('ssl_ipandport'))) { |
362 | 362 | $_POST['remove_ssl_ipandport'] = true; |
363 | 363 | } |
364 | | - Domains::getLocal($userinfo, $_POST)->update(); |
| 364 | + Domains::getLocal($userinfo, Request::postAll())->update(); |
365 | 365 | } catch (Exception $e) { |
366 | 366 | Response::dynamicError($e->getMessage()); |
367 | 367 | } |
|
572 | 572 | } |
573 | 573 | } |
574 | 574 | } elseif ($action == 'jqGetCustomerPHPConfigs') { |
575 | | - $customerid = intval($_POST['customerid']); |
| 575 | + $customerid = intval(Request::post('customerid')); |
576 | 576 | $allowed_phpconfigs = Customer::getCustomerDetail($customerid, 'allowed_phpconfigs'); |
577 | 577 | echo !empty($allowed_phpconfigs) ? $allowed_phpconfigs : json_encode([]); |
578 | 578 | exit(); |
579 | 579 | } elseif ($action == 'jqSpeciallogfileNote') { |
580 | | - $domainid = intval($_POST['id']); |
581 | | - $newval = intval($_POST['newval']); |
| 580 | + $domainid = intval(Request::post('id')); |
| 581 | + $newval = intval(Request::post('newval')); |
582 | 582 | try { |
583 | 583 | $json_result = Domains::getLocal($userinfo, [ |
584 | 584 | 'id' => $domainid |
|
594 | 594 | echo 0; |
595 | 595 | exit(); |
596 | 596 | } elseif ($action == 'import') { |
597 | | - if (isset($_POST['send']) && $_POST['send'] == 'send') { |
598 | | - $separator = Validate::validate($_POST['separator'], 'separator'); |
599 | | - $offset = (int)Validate::validate($_POST['offset'], 'offset', "/[0-9]/i"); |
| 597 | + if (Request::post('send') == 'send') { |
| 598 | + $separator = Validate::validate(Request::post('separator'), 'separator'); |
| 599 | + $offset = (int)Validate::validate(Request::post('offset'), 'offset', "/[0-9]/i"); |
600 | 600 |
|
601 | 601 | $file_name = $_FILES['file']['tmp_name']; |
602 | 602 |
|
|
636 | 636 | ]); |
637 | 637 | } |
638 | 638 | } elseif ($action == 'duplicate') { |
639 | | - if (isset($_POST['send']) && $_POST['send'] == 'send') { |
| 639 | + if (Request::post('send') == 'send') { |
640 | 640 | try { |
641 | | - Domains::getLocal($userinfo, $_POST)->duplicate(); |
| 641 | + Domains::getLocal($userinfo, Request::postAll())->duplicate(); |
642 | 642 | } catch (Exception $e) { |
643 | 643 | Response::dynamicError($e->getMessage()); |
644 | 644 | } |
|
0 commit comments