CMXX - Admin cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user