HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/sexnetzwerk24/wp-content/themes/classipress/includes/sidebar-contact.php
<?php
/**
 * Sidebar Contact template.
 *
 * @package ClassiPress\Templates
 * @author  AppThemes
 * @since   ClassiPress 3.0
 */

$msg = '';

// if contact form has been submitted, send the email
if ( isset( $_POST['submit'] ) && $_POST['send_email'] == 'yes' ) {

	$result = cp_contact_ad_owner_email( $post->ID );

	if ( $result->get_error_code() ) {
		$error_html = '';
		foreach ( $result->errors as $error ) {
			$error_html .= $error[0] . '<br />';
		}
		$msg = '<p class="red center"><strong>' . $error_html . '</strong></p>';
	} else {
		$msg = '<p class="green center"><strong>' . __( 'Your message has been sent!', APP_TD ) . '</strong></p>';
	}

}

?>


<form name="mainform" id="mainform" class="form_contact" action="#priceblock2" method="post" enctype="multipart/form-data">

	<?php echo $msg; ?>

	<p class="contact_msg"><?php _e( 'To inquire about this ad listing, complete the form below to send a message to the ad poster.', APP_TD ); ?></p>

	<ol>
		<li>
			<label><?php _e( 'Name:', APP_TD ); ?></label>
			<input name="from_name" id="from_name" type="text" minlength="2" value="<?php if ( isset( $_POST['from_name'] ) ) echo esc_attr( stripslashes( $_POST['from_name'] ) ); ?>" class="text required" />
			<div class="clr"></div>
		</li>

		<li>
			<label><?php _e( 'Email:', APP_TD ); ?></label>
			<input name="from_email" id="from_email" type="text" minlength="5" value="<?php if ( isset( $_POST['from_email'] ) ) echo esc_attr( stripslashes( $_POST['from_email'] ) ); ?>" class="text required email" />
			<div class="clr"></div>
		</li>

		<li>
			<label><?php _e( 'Subject:', APP_TD ); ?></label>
			<input name="subject" id="subject" type="text" minlength="2" value="<?php _e( 'Re:', APP_TD ); ?> <?php the_title();?>" class="text required" />
			<div class="clr"></div>
		</li>

		<li>
			<label><?php _e( 'Message:', APP_TD ); ?></label>
			<textarea name="message" id="message" rows="" cols="" class="text required"><?php if ( isset( $_POST['message'] ) ) echo esc_attr( stripslashes( $_POST['message'] ) ); ?></textarea>
			<div class="clr"></div>
		</li>

		<li>
		<?php
			// create a random set of numbers for spam prevention
			$randomNum = '';
			$randomNum2 = '';
			$randomNumTotal = '';

			$rand_num = rand( 0, 9 );
			$rand_num2 = rand( 0, 9 );
			$randomNumTotal = $randomNum + $randomNum2;
		?>
			<label><?php _e( 'Sum of', APP_TD ); ?> <?php echo $rand_num; ?> + <?php echo $rand_num2; ?> =</label>
			<input name="rand_total" id="rand_total" type="text" minlength="1" value="" class="text required number" />
			<div class="clr"></div>
		</li>

		<li>
			<input name="submit" type="submit" id="submit_inquiry" class="btn_orange" value="<?php _e( 'Send Inquiry', APP_TD ); ?>" />
		</li>

	</ol>

	<input type="hidden" name="rand_num" value="<?php echo $rand_num; ?>" />
	<input type="hidden" name="rand_num2" value="<?php echo $rand_num2; ?>" />
	<input type="hidden" name="send_email" value="yes" />

</form>