Exemple #1
0
        include 'crf_paypal.php';
    } else {
        if ($form_type == 'reg_form' && $autoapproval == 'yes') {
            $userid = $form_fields->crf_create_new_user($entry_id);
            if (!is_wp_error($userid)) {
                $form_fields->crf_insert_user_meta($entry_id, $userid);
                $form_fields->crf_create_user_notification($entry_id);
            }
        }
        /*Show Success Message start*/
        $form_fields->crf_get_success_message($content['id']);
        $form_fields->crf_get_sumission_token_number($content['id'], $entry_id);
        /*Show Success Message end*/
        /*Get redirection start*/
        $redirect_option = $form_fields->crf_get_form_option_value('redirect_option', $content['id']);
        $url = $form_fields->crf_get_redirect_url($content['id'], $redirect_option);
        if ($redirect_option != 'none') {
            header('refresh: 5; url=' . $url);
        }
        /*Get redirection end*/
    }
} else {
    $detail = array();
    $detail['User_IP'] = $_SERVER['REMOTE_ADDR'];
    //$detail['country'] = $form_fields->crf_get_country_name($_SERVER['REMOTE_ADDR']);
    $detail['Browser'] = $_SERVER['HTTP_USER_AGENT'];
    $detail['timestamp'] = time();
    $detail['key'] = time() . $content['id'];
    $details = maybe_serialize($detail);
    $insert = "INSERT INTO {$crf_stats} VALUES('','" . $content['id'] . "','" . $detail['key'] . "','" . $details . "')";
    $wpdb->query($insert);