CMXX - Admin cleanup

This commit is contained in:
“VeLiTi”
2025-02-22 15:50:27 +01:00
parent 8bb78d2a08
commit 0b2ee8c3ce
27 changed files with 67 additions and 2698 deletions

View File

@@ -3,15 +3,15 @@ defined('admin') or exit;
// Capture post data
if (isset($_POST['emailtemplate'], $_POST['emailtemplate2'])) {
// Save templates
file_put_contents('../order-details-template.php', $_POST['emailtemplate']);
file_put_contents('../order-notification-template.php', $_POST['emailtemplate2']);
file_put_contents(dirname(__FILE__,-1).'/custom/mail/order-details-template.php', $_POST['emailtemplate']);
file_put_contents(dirname(__FILE__,-1).'/custom/mail/order-notification-template.php', $_POST['emailtemplate2']);
header('Location: index.php?page=emailtemplates&success_msg=1');
exit;
}
// Read the order details template PHP file
$contents = file_get_contents('../order-details-template.php');
$contents = file_get_contents(dirname(__FILE__,-1).'/custom/mail/order-details-template.php');
// Read the order notification template PHP file
$contents2 = file_get_contents('../order-notification-template.php');
$contents2 = file_get_contents(dirname(__FILE__,-1).'/custom/mail/order-notification-template.php');
// Handle success messages
if (isset($_GET['success_msg'])) {
if ($_GET['success_msg'] == 1) {