function cs_contact_form_submit() { define('WP_USE_THEMES', false); $subject = ''; $cs_contact_error_msg = ''; $cs_contact_email = ''; $subject_name = 'Subject'; foreach ($_REQUEST as $keys => $values) { ${$keys} = esc_attr($values); } if (isset($phone) && $phone != '') { $subject_name = 'Phone'; $subject = $phone; } $bloginfo = get_bloginfo(); $subjecteEmail = "(" . $bloginfo . ") Contact Form Received"; $message = ' <table width="100%" border="1"> <tr> <td width="100"><strong>Name:</strong></td> <td>' . esc_attr($contact_name) . '</td> </tr> <tr> <td><strong>Email:</strong></td> <td>' . sanitize_email($contact_email) . '</td> </tr> <tr> <td><strong>' . $subject_name . ':</strong></td> <td>' . esc_attr($subject) . '</td> </tr> <tr> <td><strong>Message:</strong></td> <td>' . balanceTags($contact_msg, true) . '</td> </tr> <tr> <td><strong>IP Address:</strong></td> <td>' . $_SERVER["REMOTE_ADDR"] . '</td> </tr> </table>'; $headers = "From: " . esc_attr($contact_name) . "\r\n"; $headers .= "Reply-To: " . sanitize_email($contact_email) . "\r\n"; $headers .= "Content-type: text/html; charset=utf-8" . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $attachments = ''; if (wp_mail(sanitize_email($cs_contact_email), $subjecteEmail, $message, $headers, $attachments)) { $json = array(); $json['type'] = "success"; $json['message'] = '<p>' . cs_textarea_filter($cs_contact_succ_msg) . '</p>'; } else { $json['type'] = "error"; $json['message'] = '<p>' . cs_textarea_filter($cs_contact_error_msg) . '</p>'; } echo json_encode($json); die; }
} ?> margin-bottom:<?php echo $parallax_margin_bottom; ?> px; margin-top:<?php echo $parallax_margin_top; ?> px; padding-top:<?php echo $parallax_padding_top; ?> px; padding-bottom:<?php echo $parallax_padding_bottom; ?> px; "> <div class="container"> <?php if ($cs_node->parallax_title != '') { echo '<h2>' . cs_textarea_filter($cs_node->parallax_title) . '</h2>'; } ?> <?php if ($cs_node->parallax_custom_text != '') { echo cs_textarea_filter($cs_node->parallax_custom_text); } ?> <div class="clear"></div> </div> </div> <!-- Qoute Start -->
<table width="100%" border="1"> <tr> <td width="100"><strong>' . __('Name', 'WeStand') . '</strong></td> <td>' . $contact_name . '</td> </tr> <tr> <td><strong>' . __('Email', 'WeStand') . '</strong></td> <td>' . $contact_email . '</td> </tr> <tr> <td><strong>' . __('Subject', 'WeStand') . '</strong></td> <td>' . $subject . '</td> </tr> <tr> <td><strong>' . __('Message', 'WeStand') . '</strong></td> <td>' . $contact_msg . '</td> </tr> <tr> <td><strong>' . __('IP Address', 'WeStand') . '</strong></td> <td>' . $_SERVER["REMOTE_ADDR"] . '</td> </tr> </table> '; $headers = "From: " . $contact_name . "\r\n"; $headers .= "Reply-To: " . $contact_email . "\r\n"; $headers .= "Content-type: text/html; charset=utf-8" . "\r\n"; $headers .= "MIME-Version: 1.0" . "\r\n"; $attachments = ''; wp_mail($cs_contact_email, $subject, $message, $headers, $attachments); echo "<p>" . cs_textarea_filter($cs_contact_succ_msg) . "</p>";