Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sergeyrus72

    (@sergeyrus72)

    <?php
    require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
    
    $method = $_SERVER['REQUEST_METHOD'];
    
    //Script Foreach
    $c = true;
    if ( $method === 'POST' ) {
    
    	$project_name = "eurodesign72.ru";
    	$admin_email  = "*****@eurodesign72.ru";
    	$form_subject = "Заказ с сайта";
    
    	foreach ( $_POST as $key => $value ) {
    		if ( $value != "" && $key != "form_subject" ) {
    			if($key == 'auto_app_agree') continue;
    			switch($key){
    				case 'name':
    					$n = 'Имя';
    					break;
    				case 'tel':
    					$n = 'Телефон';
    					break;
    				case 'email':
    					$n = 'E-mail';
    					break;
    				case 'town':
    					$n = 'Город';
    					break;
    				case 'address':
    					$n = 'Адрес';
    					break;
    				case 'room':
    					$n = 'Кол-во комнат';
    					break;
    				case 'window':
    					$n = 'Кол-во окон';
    					break;
    				default :
    					$n = 'Поле';
    					break;
    				}
    			$message .= "
    			" . ( ($c = !$c) ? '<tr>':'<tr style="background-color: #f8f8f8;">' ) . "
    				<td style='padding: 10px; border: #e9e9e9 1px solid;'><b>$n</b></td>
    				<td style='padding: 10px; border: #e9e9e9 1px solid;'>$value</td>
    			</tr>
    			";
    		}
    	}
    }
    
    $message = "<table style='width: 100%;'>$message</table>";
    $last = 'yoursite';
    $tema = '=?utf-8?B?'.base64_encode($last).'?=';
    
    mail($admin_email, $form_subject, $message, "From: $tema" . "\r\n" . "Reply-To: $admin_email" . "\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\n" . "Content-type: text/html; charset=\"utf-8\"");
    Plugin Support amagsumov

    (@amagsumov)

    Hello, @sergeyrus72

    As far as I can see, the anti-spam protection is not working on your forms due to the absence of an “email” field on them. I recommend you to add necessary “email” fields on your forms.

    Or you can enable the “Check all post data” option in plugin settings

    WordPress Admin Page —> Settings —> Antispam by CleanTalk —> Advanced settings —> set the option “Check all post data” to “Yes” Show statistics in admin bar —> Save Changes.

    Make note, enabling of this option may lead to conflicts.

    As for the “empty window pops up” issue. What plugin you’ve used to build these forms?

    Thread Starter sergeyrus72

    (@sergeyrus72)

    Thanks for the answer! Yes, spam is received periodically. In this niche of services, it is not profitable to ask for mail, the main source of data is phone numbers! As you said, we are watching the work..

    The plugin is not used, at least there are no reverse form plugins installed in the admin panel. The form is homemade in PHP above is the code of the file where this form is configured

    Plugin Support amagsumov

    (@amagsumov)

    Hello,

    Thank you for your feedback.

    We replied to your ticket in our support system:
    https://cleantalk.org/my/support

    Also it would be better if we continue our conversation there.

    Thread Starter sergeyrus72

    (@sergeyrus72)

    Thanks! The issue is resolved by disabling the “Protect internal forms” option.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[NSFW] New window when submitting a form’ is closed to new replies.