Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

// function handle_ivo_forms() { global $wpdb; // if (isset(..

Decoded Output download

<?  //      
function handle_ivo_forms() { 
    global $wpdb; 
 
    //        
    if (isset($_POST['submit_ivo_zamqna_form'])) { 
        $return_option = 'exchange'; 
        $id_value = isset($_POST['exchange_id_field']) ? sanitize_text_field($_POST['exchange_id_field']) : ''; 
        $Full_name = sanitize_text_field($_POST['exchange_full_name']); 
        $Phone = sanitize_text_field($_POST['exchange_phone']); 
        $Email = sanitize_text_field($_POST['exchange_email']); 
        $Returne_items = sanitize_text_field($_POST['exchange_return_items']); 
        $Replace_product = sanitize_text_field($_POST['replace_product']); 
        $table_name = 'Ex8Np_return_exchange_forms'; 
    } elseif (isset($_POST['submit_ivo_return_form'])) { 
        $return_option = 'return'; 
        $id_value = isset($_POST['return_id_field']) ? sanitize_text_field($_POST['return_id_field']) : ''; 
        $Full_name = sanitize_text_field($_POST['return_full_name']); 
        $Phone = sanitize_text_field($_POST['return_phone']); 
        $Email = sanitize_text_field($_POST['return_email']); 
        $Returne_items = sanitize_text_field($_POST['return_return_items']); 
        $Replace_product = sanitize_text_field($_POST['return_replace_product']); 
        $table_name = 'Ex8Np_return_forms'; 
    } else { 
        //       ,    
        return; 
    } 
 
    //    ID (,  ) 
    if (empty($id_value)) { 
        echo ""; 
    } else { 
        // ,        
        $data = array( 
            'Order_ID' => $id_value, 
            'Ex_re' => $return_option, 
            'Full_name' => $Full_name, 
            'Phone' => $Phone, 
            'Email' => $Email, 
            'Returne_items' => $Returne_items, 
            'Replace_product' => $Replace_product, 
            'timestamp' => current_time('mysql'), //   timestamp,  current_time('mysql') 
        ); 
 
        //    
        $data_format = array('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'); 
 
        //       
        $wpdb->insert($table_name, $data, $data_format); 
 
        //     
        echo "   ."; 
    } 
} 
 
 
 
 
 
 
 
    // HTML   
    ob_start(); 
    ?> 
    <style> 
        .return-option-label { 
            font-weight: bold; 
        } 
 
        .return-option-wrapper { 
            margin-bottom: 10px; 
        } 
 
        .return-option-input { 
            margin-right: 5px; 
        } 
 
        .form-section { 
            display: none; 
        } 
 
        .checkbox-label { 
            display: block; 
            margin-bottom: 5px; 
        } 
 
        .form-hint { 
            font-size: 12px; 
            margin-top: 5px; 
        } 
    </style> 
 
    <script> 
    jQuery(document).ready(function($) { 
      function setRequiredFieldsForForm(formId, requiredFields) { 
        for (const field of requiredFields) { 
          $('#' + formId + ' [name="' + field + '"]').attr('required', true).show(); 
        } 
      } 
 
      function removeRequiredFieldsForForm(formId, requiredFields) { 
        for (const field of requiredFields) { 
          $('#' + formId + ' [name="' + field + '"]').removeAttr('required').hide(); 
        } 
      } 
 
      //           
      $('input[name="return_option"]').on('change', function() { 
        var selectedOption = $(this).val(); 
        $('.form-section').hide(); 
        $('#' + selectedOption + '-section').show(); 
 
        //      "required"       
        if (selectedOption === 'exchange') { 
          setRequiredFieldsForForm('return-exchange-form', [ 
            'exchange_phone', 
            'exchange_email', 
            'exchange_return_items', 
            'replace_product', 
            'exchange_return_terms', 
            'exchange_return_condition', 
            'exchange_full_name', 
            'id_field', 
          ]); 
          removeRequiredFieldsForForm('return-exchange-form', [ 
            'return_phone', 
            'return_email', 
            'return_items', 
            'return_reason', 
            'return-order-number', 
            'return_full_name', 
            'iban', 
            'swift_bic', 
            'titular', 
            'return_terms', 
            'return_condition', 
          ]); 
        } else if (selectedOption === 'return') { 
          removeRequiredFieldsForForm('return-exchange-form', [ 
            'exchange_phone', 
            'exchange_email', 
            'exchange_return_items', 
            'replace_product', 
            'exchange_return_terms', 
            'exchange_return_condition', 
            'exchange_full_name', 
            'exchange-id_field', 
            'id_field', 
          ]); 
          setRequiredFieldsForForm('return-exchange-form', [ 
            'return_phone', 
            'return_email', 
            'return_items', 
            'return_reason', 
            'return-order-number', 
            'return_full_name', 
            'iban', 
            'swift_bic', 
            'titular', 
            'return_terms', 
            'return_condition', 
          ]); 
        } 
      }); 
 
      //         
      $('input[name="return_condition"]').on('change', function() { 
        var returnConditionChecked = $(this).prop('checked'); 
 
        //      "required"   ,     
        if (returnConditionChecked) { 
          setRequiredFieldsForForm('return-exchange-form', [ 
            'return_phone', 
            'return_email', 
            'return_items', 
            'return_reason', 
            'iban', 
            'swift_bic', 
            'titular', 
            'return_terms', 
          ]); 
 
          //   ,      ,   "required" 
          removeRequiredFieldsForForm('return-exchange-form', [ 
            'exchange_phone', 
            'exchange_email', 
            'exchange_return_items', 
            'replace_product', 
            'exchange_return_terms', 
            'exchange_return_condition', 
            'exchange_full_name', 
            'id_field', 
          ]); 
        } else { 
          //     ,     
          setRequiredFieldsForForm('return-exchange-form', [ 
            'exchange_phone', 
            'exchange_email', 
            'exchange_return_items', 
            'replace_product', 
            'exchange_return_terms', 
            'exchange_return_condition', 
            'exchange_full_name', 
            'id_field', 
          ]); 
          setRequiredFieldsForForm('return-exchange-form', [ 
            'return_phone', 
            'return_email', 
            'return_items', 
            'return_reason', 
            'iban', 
            'swift_bic', 
            'titular', 
            'return_terms', 
          ]); 
        } 
      }); 
 
      //       
      $('#return-exchange-form').on('submit', function(event) { 
        event.preventDefault(); //      
 
        //         ,   
 
        //      AJAX 
        $.ajax({ 
          type: 'POST', 
          url: $(this).attr('action'), 
          data: $(this).serialize(), 
          success: function(data) { 
            //         ,   
 
            //        
            window.location.href = 'https://tuasolea.bg/uspeshno-popalnena-forma-za-vrasthane-2/'; 
          }, 
          error: function() { 
            //           ,   
            alert('     .'); 
          } 
        }); 
      }); 
    }); 
 
    </script> 
 
 
    <form id="return-exchange-form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>"> 
 
      <br> 
      <br> 
      <P>     ,   ,   <strong></strong>.<br> 
                  ,    <strong></strong>. 
        ,          .</p> 
        <br> 
        <p> ,            <strong>0883216669</strong></p> 
        <br> 
        <br> 
        <div class="return-option-wrapper"> 
            <span class="return-option-label">  :</span> 
        </div> 
        <div class="return-option-wrapper"> 
            <input type="radio" id="return-option-exchange" name="return_option" value="exchange" class="return-option-input"> 
            <label for="return-option-exchange" class="return-option-label"> ()</label> 
            <div class="ordered-products"></div> 
        </div> 
        <div class="return-option-wrapper"> 
            <input type="radio" id="return-option-return" name="return_option" value="return" class="return-option-input"> 
            <label for="return-option-return" class="return-option-label"></label> 
            <div class="ordered-products"></div> 
        </div> 
        <br> 
        <div class="form-section" id="exchange-section" style=""> 
            <label for="exchange_id_field">  :</label> 
            <input type="text" id="exchange_id_field" name="exchange_id_field" required> 
            <span id="exchange-order-number-error" style="color: red;"></span> 
            <div class="form-hint">       ,     .</div> 
            <br> 
            <label for="exchange-full-name">  :</label> 
            <input type="text" id="exchange_full_name" name="exchange_full_name" required> 
            <div class="form-hint">,       .</div> 
            <br> 
            <label for="exchange-phone"> :</label> 
            <input type="text" id="exchange_phone" name="exchange_phone" required> 
            <br> 
            <label for="exchange-email">:</label> 
            <input type="email" id="exchange_email" name="exchange_email" required> 
            <br> 
            <div> 
                <label for="exchange-return-items"> ?</label> 
                <input type="text" style="margin-bottom:0px" id="exchange_return_items" name="exchange_return_items" placeholder=": 700000-37  700001-39" required> 
            </div> 
            <div> 
                <p style="color:red;font-size:12px">,     .</p> 
                <p style="font-size:12px">     ,        
                    ,       .</p> 
            </div> 
            <br> 
            <label for="replace-product">     ?</label> 
            <input type="text" id="replace_product" name="replace_product" placeholder=": 700000-38  700001-40" required> 
            <br> 
            <label for="exchange-return-terms" class="checkbox-label"> 
                <input style="margin-top:20px" type="checkbox" id="exchange-return-terms" name="exchange_return_terms" required> 
                /     
            </label> 
            <label for="exchange-return-condition" class="checkbox-label"> 
                <input type="checkbox" id="exchange-return-condition" name="exchange_return_condition" required> 
                       
            </label> 
            <br> 
            <input type="hidden" name="submit_ivo_zamqna_form" value="1" /> 
            <input type="submit" value=""> 
 
            <br> 
            <br> 
            <br> 
 
        </div> 
        <div class="form-section" id="return-section"> 
            <label for="return-order-number">  :</label> 
            <input type="text" id="return_order_number" name="return-order-number" required> 
            <span id="order-number-error" style="color: red;"></span> 
            <div class="form-hint">       ,     .</div> 
            <br> 
            <label for="return-full-name">  :</label> 
            <input type="text" id="return_full_name" name="return_full_name" required> 
            <div class="form-hint">,       .</div> 
            <br> 
            <label for="return-phone"> :</label> 
            <input type="text" id="return_phone" name="return_phone" required> 
            <br> 
            <label for="return-email">:</label> 
            <input type="email" id="return_email" name="return_email" required> 
            <br> 
            <label for="return-items"> ?</label> 
            <input type="text" style="margin-bottom:0px" id="return_items" name="return_items" placeholder=": 700000-37  700001-39" required> 
            <div> 
                <p style="color:red;font-size:12px">,     .</p> 
                <p style="font-size:12px">     ,        
                    ,       .</p> 
            </div> 
 
            <label for="iban">IBAN:</label> 
            <input type="text" id="iban" name="iban" required> 
            <div class="form-hint">     </div> 
            <div class="form-hint" style="color: red;">!      IBAN</div> 
            <br> 
            <label for="swift-bic">SWIFT/BIC -   </label> 
            <input type="text" id="swift-bic" name="swift_bic" required> 
            <br> 
            <label for="titular">    </label> 
            <input type="text" id="titular" name="titular" required> 
            <br> 
            <label style="margin-top:20px" for="return-terms" class="checkbox-label"> 
                <input type="checkbox" id="return-terms" name="return_terms" required> 
                /     
            </label> 
            <label for="return-condition" class="checkbox-label"> 
                <input type="checkbox" id="return-condition" name="return_condition" required> 
                       
            </label> 
            <br> 
 
<input type="hidden" name="submit_ivo_return_form" value="1" /> 
 
 
<input type="submit" value="  "> 
            <br> 
            <br> 
            <br> 
 
 
</div> 
 
        </div> 
 
    </form> 
    <?php 
    return ob_get_clean(); 
} 
 
//        
add_shortcode('Ivo-zamqna', 'handle_ivo_zamqna_form'); ?>

Did this file decode correctly?

Original Code

//     
function handle_ivo_forms() {
    global $wpdb;

    //       
    if (isset($_POST['submit_ivo_zamqna_form'])) {
        $return_option = 'exchange';
        $id_value = isset($_POST['exchange_id_field']) ? sanitize_text_field($_POST['exchange_id_field']) : '';
        $Full_name = sanitize_text_field($_POST['exchange_full_name']);
        $Phone = sanitize_text_field($_POST['exchange_phone']);
        $Email = sanitize_text_field($_POST['exchange_email']);
        $Returne_items = sanitize_text_field($_POST['exchange_return_items']);
        $Replace_product = sanitize_text_field($_POST['replace_product']);
        $table_name = 'Ex8Np_return_exchange_forms';
    } elseif (isset($_POST['submit_ivo_return_form'])) {
        $return_option = 'return';
        $id_value = isset($_POST['return_id_field']) ? sanitize_text_field($_POST['return_id_field']) : '';
        $Full_name = sanitize_text_field($_POST['return_full_name']);
        $Phone = sanitize_text_field($_POST['return_phone']);
        $Email = sanitize_text_field($_POST['return_email']);
        $Returne_items = sanitize_text_field($_POST['return_return_items']);
        $Replace_product = sanitize_text_field($_POST['return_replace_product']);
        $table_name = 'Ex8Np_return_forms';
    } else {
        //       ,   
        return;
    }

    //    ID (,  )
    if (empty($id_value)) {
        echo "";
    } else {
        // ,       
        $data = array(
            'Order_ID' => $id_value,
            'Ex_re' => $return_option,
            'Full_name' => $Full_name,
            'Phone' => $Phone,
            'Email' => $Email,
            'Returne_items' => $Returne_items,
            'Replace_product' => $Replace_product,
            'timestamp' => current_time('mysql'), //   timestamp,  current_time('mysql')
        );

        //   
        $data_format = array('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');

        //      
        $wpdb->insert($table_name, $data, $data_format);

        //    
        echo "   .";
    }
}







    // HTML  
    ob_start();
    ?>
    <style>
        .return-option-label {
            font-weight: bold;
        }

        .return-option-wrapper {
            margin-bottom: 10px;
        }

        .return-option-input {
            margin-right: 5px;
        }

        .form-section {
            display: none;
        }

        .checkbox-label {
            display: block;
            margin-bottom: 5px;
        }

        .form-hint {
            font-size: 12px;
            margin-top: 5px;
        }
    </style>

    <script>
    jQuery(document).ready(function($) {
      function setRequiredFieldsForForm(formId, requiredFields) {
        for (const field of requiredFields) {
          $('#' + formId + ' [name="' + field + '"]').attr('required', true).show();
        }
      }

      function removeRequiredFieldsForForm(formId, requiredFields) {
        for (const field of requiredFields) {
          $('#' + formId + ' [name="' + field + '"]').removeAttr('required').hide();
        }
      }

      //          
      $('input[name="return_option"]').on('change', function() {
        var selectedOption = $(this).val();
        $('.form-section').hide();
        $('#' + selectedOption + '-section').show();

        //      "required"      
        if (selectedOption === 'exchange') {
          setRequiredFieldsForForm('return-exchange-form', [
            'exchange_phone',
            'exchange_email',
            'exchange_return_items',
            'replace_product',
            'exchange_return_terms',
            'exchange_return_condition',
            'exchange_full_name',
            'id_field',
          ]);
          removeRequiredFieldsForForm('return-exchange-form', [
            'return_phone',
            'return_email',
            'return_items',
            'return_reason',
            'return-order-number',
            'return_full_name',
            'iban',
            'swift_bic',
            'titular',
            'return_terms',
            'return_condition',
          ]);
        } else if (selectedOption === 'return') {
          removeRequiredFieldsForForm('return-exchange-form', [
            'exchange_phone',
            'exchange_email',
            'exchange_return_items',
            'replace_product',
            'exchange_return_terms',
            'exchange_return_condition',
            'exchange_full_name',
            'exchange-id_field',
            'id_field',
          ]);
          setRequiredFieldsForForm('return-exchange-form', [
            'return_phone',
            'return_email',
            'return_items',
            'return_reason',
            'return-order-number',
            'return_full_name',
            'iban',
            'swift_bic',
            'titular',
            'return_terms',
            'return_condition',
          ]);
        }
      });

      //        
      $('input[name="return_condition"]').on('change', function() {
        var returnConditionChecked = $(this).prop('checked');

        //      "required"   ,    
        if (returnConditionChecked) {
          setRequiredFieldsForForm('return-exchange-form', [
            'return_phone',
            'return_email',
            'return_items',
            'return_reason',
            'iban',
            'swift_bic',
            'titular',
            'return_terms',
          ]);

          //   ,      ,   "required"
          removeRequiredFieldsForForm('return-exchange-form', [
            'exchange_phone',
            'exchange_email',
            'exchange_return_items',
            'replace_product',
            'exchange_return_terms',
            'exchange_return_condition',
            'exchange_full_name',
            'id_field',
          ]);
        } else {
          //     ,    
          setRequiredFieldsForForm('return-exchange-form', [
            'exchange_phone',
            'exchange_email',
            'exchange_return_items',
            'replace_product',
            'exchange_return_terms',
            'exchange_return_condition',
            'exchange_full_name',
            'id_field',
          ]);
          setRequiredFieldsForForm('return-exchange-form', [
            'return_phone',
            'return_email',
            'return_items',
            'return_reason',
            'iban',
            'swift_bic',
            'titular',
            'return_terms',
          ]);
        }
      });

      //      
      $('#return-exchange-form').on('submit', function(event) {
        event.preventDefault(); //     

        //         ,  

        //      AJAX
        $.ajax({
          type: 'POST',
          url: $(this).attr('action'),
          data: $(this).serialize(),
          success: function(data) {
            //         ,  

            //       
            window.location.href = 'https://tuasolea.bg/uspeshno-popalnena-forma-za-vrasthane-2/';
          },
          error: function() {
            //           ,  
            alert('     .');
          }
        });
      });
    });

    </script>


    <form id="return-exchange-form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">

      <br>
      <br>
      <P>     ,   ,   <strong></strong>.<br>
                  ,    <strong></strong>.
        ,          .</p>
        <br>
        <p> ,            <strong>0883216669</strong></p>
        <br>
        <br>
        <div class="return-option-wrapper">
            <span class="return-option-label">  :</span>
        </div>
        <div class="return-option-wrapper">
            <input type="radio" id="return-option-exchange" name="return_option" value="exchange" class="return-option-input">
            <label for="return-option-exchange" class="return-option-label"> ()</label>
            <div class="ordered-products"></div>
        </div>
        <div class="return-option-wrapper">
            <input type="radio" id="return-option-return" name="return_option" value="return" class="return-option-input">
            <label for="return-option-return" class="return-option-label"></label>
            <div class="ordered-products"></div>
        </div>
        <br>
        <div class="form-section" id="exchange-section" style="">
            <label for="exchange_id_field">  :</label>
            <input type="text" id="exchange_id_field" name="exchange_id_field" required>
            <span id="exchange-order-number-error" style="color: red;"></span>
            <div class="form-hint">       ,     .</div>
            <br>
            <label for="exchange-full-name">  :</label>
            <input type="text" id="exchange_full_name" name="exchange_full_name" required>
            <div class="form-hint">,       .</div>
            <br>
            <label for="exchange-phone"> :</label>
            <input type="text" id="exchange_phone" name="exchange_phone" required>
            <br>
            <label for="exchange-email">:</label>
            <input type="email" id="exchange_email" name="exchange_email" required>
            <br>
            <div>
                <label for="exchange-return-items"> ?</label>
                <input type="text" style="margin-bottom:0px" id="exchange_return_items" name="exchange_return_items" placeholder=": 700000-37  700001-39" required>
            </div>
            <div>
                <p style="color:red;font-size:12px">,     .</p>
                <p style="font-size:12px">     ,       
                    ,       .</p>
            </div>
            <br>
            <label for="replace-product">     ?</label>
            <input type="text" id="replace_product" name="replace_product" placeholder=": 700000-38  700001-40" required>
            <br>
            <label for="exchange-return-terms" class="checkbox-label">
                <input style="margin-top:20px" type="checkbox" id="exchange-return-terms" name="exchange_return_terms" required>
                /    
            </label>
            <label for="exchange-return-condition" class="checkbox-label">
                <input type="checkbox" id="exchange-return-condition" name="exchange_return_condition" required>
                      
            </label>
            <br>
            <input type="hidden" name="submit_ivo_zamqna_form" value="1" />
            <input type="submit" value="">

            <br>
            <br>
            <br>

        </div>
        <div class="form-section" id="return-section">
            <label for="return-order-number">  :</label>
            <input type="text" id="return_order_number" name="return-order-number" required>
            <span id="order-number-error" style="color: red;"></span>
            <div class="form-hint">       ,     .</div>
            <br>
            <label for="return-full-name">  :</label>
            <input type="text" id="return_full_name" name="return_full_name" required>
            <div class="form-hint">,       .</div>
            <br>
            <label for="return-phone"> :</label>
            <input type="text" id="return_phone" name="return_phone" required>
            <br>
            <label for="return-email">:</label>
            <input type="email" id="return_email" name="return_email" required>
            <br>
            <label for="return-items"> ?</label>
            <input type="text" style="margin-bottom:0px" id="return_items" name="return_items" placeholder=": 700000-37  700001-39" required>
            <div>
                <p style="color:red;font-size:12px">,     .</p>
                <p style="font-size:12px">     ,       
                    ,       .</p>
            </div>

            <label for="iban">IBAN:</label>
            <input type="text" id="iban" name="iban" required>
            <div class="form-hint">     </div>
            <div class="form-hint" style="color: red;">!      IBAN</div>
            <br>
            <label for="swift-bic">SWIFT/BIC -   </label>
            <input type="text" id="swift-bic" name="swift_bic" required>
            <br>
            <label for="titular">    </label>
            <input type="text" id="titular" name="titular" required>
            <br>
            <label style="margin-top:20px" for="return-terms" class="checkbox-label">
                <input type="checkbox" id="return-terms" name="return_terms" required>
                /    
            </label>
            <label for="return-condition" class="checkbox-label">
                <input type="checkbox" id="return-condition" name="return_condition" required>
                      
            </label>
            <br>

<input type="hidden" name="submit_ivo_return_form" value="1" />


<input type="submit" value="  ">
            <br>
            <br>
            <br>


</div>

        </div>

    </form>
    <?php
    return ob_get_clean();
}

//       
add_shortcode('Ivo-zamqna', 'handle_ivo_zamqna_form');

Function Calls

None

Variables

None

Stats

MD5 b4e68b8b524f3c610132241779ba7e01
Eval Count 0
Decode Time 83 ms