From: Steve Sutton Date: Fri, 18 May 2018 12:41:24 +0000 (-0400) Subject: Updating the email part. X-Git-Tag: v1.0.0^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=65f128dd8764efef7a6a886bda24dbab8c7a3c44;p=WP-Plugins%2Fglm-member-db-support.git Updating the email part. Need to use the php filter for the form values to use them. --- diff --git a/models/admin/support/index.php b/models/admin/support/index.php index 724f512..2a18eab 100644 --- a/models/admin/support/index.php +++ b/models/admin/support/index.php @@ -82,6 +82,8 @@ class GlmMembersAdmin_support_index // extends GlmDataLeadEntry $view = 'index'; $email_settings = false; $option = false; + $support_name = ''; + $support_email = ''; if ( isset( $_REQUEST['option'] ) ) { $option = filter_var( $_REQUEST['option'], FILTER_SANITIZE_STRING ); @@ -100,14 +102,18 @@ class GlmMembersAdmin_support_index // extends GlmDataLeadEntry } if ($email) { + $form_name = filter_var( $_REQUEST['name'] ); + $form_email = filter_var( $_REQUEST['email'] ); + $form_problem = filter_var( $_REQUEST['problem'] ); + // Setup the Headers. $hdrs = 'From: '.$from_name.' <' . $from . '>'; - $hdrs .= "\nReply-To: {$values['name']} <{$values['email']}>"; + $hdrs .= "\nReply-To: {$form_name} <{$form_email}>"; // Setup the message. - $msg = 'Name: ' . $values['name'] . "\n" . - 'Email: ' . $values['email'] . "\n" . - 'Problem:' . stripslashes($values['problem']) . "\n\n\n" . + $msg = 'Name: ' . $form_name . "\n" . + 'Email: ' . $form_email . "\n" . + 'Problem:' . stripslashes($form_problem) . "\n\n\n" . 'SiteName: ' . get_bloginfo('name') . "\n" . 'SiteUrl: ' . get_bloginfo('url') . "\n" . 'Date: ' . date('m/d/Y') . "\n" . @@ -136,7 +142,7 @@ class GlmMembersAdmin_support_index // extends GlmDataLeadEntry } wp_mail( - $email.','.$values['email'], + $email.','.$form_email, 'Support Form', $msg, $hdrs, @@ -158,7 +164,9 @@ class GlmMembersAdmin_support_index // extends GlmDataLeadEntry // Common things to place into the $templateData array $templateData = array( - 'pluginAsset' => GLM_MEMBERS_SUPPORT_PLUGIN_URL . '/assets' + 'pluginAsset' => GLM_MEMBERS_SUPPORT_PLUGIN_URL . '/assets', + 'name' => $support_name, + 'email' => $support_email, ); diff --git a/views/admin/support/index.html b/views/admin/support/index.html index 36c4954..2a995d0 100644 --- a/views/admin/support/index.html +++ b/views/admin/support/index.html @@ -88,7 +88,7 @@ Your Name: - + @@ -97,7 +97,7 @@ Your E-mail: - + @@ -111,7 +111,7 @@ - * Upload a screenshot: + Upload a screenshot:
(1MB Max)