+ // check for our content type and arrange our info accordingly
+ if ( 'text/html' == $dnxcf_email_output ) {
+ require( apply_filters( 'dnxcf_template_file', dirname( __FILE__ ) . '/include/dnxcf_mail_template_danixland.php' ) );
+ $dnxcf_email_data = array(
+ 'ownname' => $dnxcf_options['dnxcf_recv_name'],
+ 'site' => get_bloginfo( 'name' ),
+ 'time' => $dnxcf_ltd,
+ 'host' => $dnxcf_hst,
+ 'ua' => $dnxcf_ua,
+ );
+ $dnxcf_message = dnxcf_email_content( $dnxcf_email_data, $dnxcf_posted );
+ } else { // content_type is set to text/plain
+ $dnxcf_message = sprintf(
+ __( "Hello \"%1\$s\",\nyou are being contacted by %2\$s on %3\$s.\n%4\$s has provided the following informations:\n\tEmail:\t\t%5\$s\n\tWebsite:\t%6\$s\n\tMessage:\n\n%7\$s", 'dnxcf' ),
+ $dnxcf_options['dnxcf_recv_name'],
+ $dnxcf_posted['dnxcf_name'],
+ get_bloginfo( 'name' ),
+ $dnxcf_posted['dnxcf_name'],
+ $dnxcf_posted['dnxcf_email'],
+ $dnxcf_posted['dnxcf_website'],
+ $dnxcf_posted['dnxcf_message']
+ );
+ $dnxcf_message .= "\n\n##-----------#-----------#-----------##\n\n";
+ $dnxcf_message .= sprintf(
+ __( "We have also collected the following informations:\n\tBrowser:\t%1\$s\n\tTime:\t\t%2\$s\n\tIP Address:\t%3\$s\n", 'dnxcf' ),
+ $dnxcf_ua,
+ $dnxcf_ltd,
+ $dnxcf_hst
+ );
+ } // end check for mail_content_type
+
+ $dnxcf_mailed = wp_mail( $dnxcf_to, $dnxcf_subject, $dnxcf_message, $dnxcf_headers );
+
+ if ( $dnxcf_mailed ) {
+ ?>
+ <p id="dnxcf_success"><?php _e( 'your email was sent successfully. Here\'s the data you submitted via our form.', 'dnxcf' ); ?></p>
+ <p>
+ <dl>
+ <dt><?php _e( 'Your Name:', 'dnxcf' ); ?></dt>
+ <dd><?php echo $dnxcf_posted['dnxcf_name']; ?></dd>
+ <dt><?php _e( 'Your e-mail:', 'dnxcf' ); ?></dt>
+ <dd><?php echo $dnxcf_posted['dnxcf_email']; ?></dd>
+ <dt><?php _e( 'Subject of your message:', 'dnxcf' ); ?></dt>
+ <dd><?php echo $dnxcf_posted['dnxcf_subject']; ?></dd>
+ <dt><?php _e( 'Text of your Message:', 'dnxcf' ); ?></dt>
+ <dd><blockquote><?php echo wptexturize( wpautop( $dnxcf_posted['dnxcf_message'] ) ); ?></blockquote></dd>
+ </dl>
+ </p>
+ <p><?php _e( 'we also collected some data for tecnical reasons.', 'dnxcf' ); ?></p>
+ <p>
+ <dl>
+ <dt><?php _e( 'Your IP address:', 'dnxcf' ); ?></dt>
+ <dd><?php echo $dnxcf_hst; ?></dd>
+ <dt><?php _e( 'Your Browser:', 'dnxcf' ); ?></dt>
+ <dd><?php echo $dnxcf_ua; ?></dd>
+ </dl>
+ </p>
+ <?php } else { ?>
+ <p id="dnxcf_result_failure"><?php printf( __( 'there was a problem processing your email. Please contact the <a href="mailto:%s">administrator</a>.', 'dnxcf' ), get_bloginfo( 'admin_email' ) ); ?></p>
+ <?php }
+ } else {
+ // dnxcf_pagelikes was not empty. This is a problem. ?>
+ <p id="dnxcf_spammer"><?php _e( 'looks like you don\'t belong here. We don\'t like spammers. Go away now!', 'dnxcf' ); ?></p>
+ <?php }