Example #1
0
function optinrev_plugin_admin_init()
{
    global $plugin_page, $wp_version;
    $dir = plugin_dir_url(__FILE__);
    //Clear all cookies
    if (isset($_GET['cookies']) && ($cls_cookies = esc_html($_GET['cookies']))) {
        if ($cls_cookies === 'clear') {
            foreach ($_COOKIE as $key => $value) {
                @setcookie($key, $value, time() - 3600, '/', COOKIE_DOMAIN, false);
            }
            update_option('optinrev_cookies', 'cleaned');
            wp_redirect('admin.php?page=optinrevolution');
            exit;
        }
    }
    //enabled
    if (isset($_GET['enable'])) {
        optinrev_update('optinrev_popup_enabled', 'true');
        wp_redirect('admin.php?page=' . $plugin_page);
        exit;
    }
    //optin
    if ($plugin_page == 'optinrevolution') {
        //enabled
        if (isset($_GET['enable'])) {
            optinrev_update('optinrev_popup_enabled', 'true');
        }
        optinrev_enqueue(0);
    } else {
        if ($plugin_page == 'optinrevolution/optin1') {
            optinrev_enqueue(1);
            //wotoptin images
            if (!optinrev_get('optinrev_default_images')) {
                $wot_imgs = array('get_access' => array('get_access1' => $dir . 'images/get_access1.png', 'get_access2' => $dir . 'images/get_access2.png', 'get_access3' => $dir . 'images/get_access3.png'), 'close_btn' => array('close1' => $dir . 'images/close1b.png', 'close2' => $dir . 'images/close2b.png', 'close3' => $dir . 'images/close3b.png', 'close4' => $dir . 'images/close1r.png', 'close5' => $dir . 'images/close2r.png', 'close6' => $dir . 'images/close3r.png', 'close7' => $dir . 'images/btn1.png', 'close8' => $dir . 'images/btn2.png'));
                optinrev_update('optinrev_default_images', serialize($wot_imgs));
                //init get access button
                foreach ($wot_imgs['get_access'] as $km => $vm) {
                    optinrev_update('optinrev_cuid_' . optinrev_unique_id(), $km . '.png|' . $km);
                }
            }
            //default content
            if (!optinrev_get('optinrev_default')) {
                $default_optin = array('action' => 'optinrev_action', 'save_setup_settings' => 'optinrevolution/optin1', 'optinrev_data' => '<div style="position: absolute; left: 421px; top: 297px;border: 1px solid transparent; z-index: 5;"><img id="wm" alt="" src="' . $dir . 'assets/get_access2.png" border="0"></div><div style="position: absolute; left: 270px; top: 128px;border: 1px solid transparent;"><img id="stage_img_48" alt="" src="' . $dir . 'assets/v-arrows.gif" border="0"></div><div style="position: absolute; left: 492px; top: 384px;border: 1px solid transparent;"><img id="stage_img_47" alt="" src="' . $dir . 'assets/padlock.png" border="0"></div><div style="position: absolute; left: 511px; top: 387px; z-index: 1;border: 1px solid transparent;"><span style="font-size: 8pt;" data-mce-style="font-size: 8pt;">Your Privacy Is Protected.</span></div><div style="position: absolute; left: 87px; top: 85px; z-index: 1; text-align: center;border: 1px solid transparent;"><strong><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;" data-mce-style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;">On Average, 8 Out Of 10 People Will Read Headline Copy</span></strong><br><strong><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;" data-mce-style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;">But Only 2 Out Of 10 Will Read The Rest.</span></strong></div><div style="position: absolute; left: 4px; top: 10px; z-index: 1; text-align: center;border: 1px solid transparent;"><span style="font-family: impact, chicago; font-size: 24pt; color: #ff0000;">Remember, Every Element Of Compelling Copy Has Just<br>One Purpose - To Get The Next Sentence Read!</span></div><div style="position: absolute; left: 422px; top: 185px; z-index: 1; text-align: center; line-height: 16px; border: 1px solid transparent;"><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">Simply enter your best email below then click</span><br><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">"Get Access Now!" button and get instant</span><br><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;" data-mce-style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">access to _____________ - <strong><span style="color: #ff0000;" data-mce-style="color: #ff0000;">100% FREE</span></strong></span></div><div style="position: absolute; left: 416px; top: 137px; z-index: 1; text-align: center;border: 1px solid transparent;"><span style="font-family: impact, chicago; font-size: 24pt; background-color: #ffff99;" data-mce-style="font-family: impact, chicago; font-size: 24pt; background-color: #ffff99;">FREE INSTANT ACCESS</span></div><div style="position: absolute; left: 7px; top: 116px; z-index: 2; border: 1px solid transparent;"><img id="stage_img_250" alt="" src="' . $dir . 'assets/girl.gif" border="0" /></div><div id="poweredby" style="position: absolute; left: 240px; top: 420px; color: white;"><a href="http://goo.gl/0hf0ke" target="_blank" rel="nofollow" style="color:white !important">Powered</a> <span style="color:white">by</span> <a href="http://goo.gl/0hf0ke" target="_blank" rel="nofollow" style="color:white !important">Optin Revolution</a></div><form method="post" id="mce_getaccessed" action="https://www.optinrevolution.com/setup/?utm_source=plugin&utm_medium=not-setup&utm_campaign=lite" target="_blank"><div style="display:none;"><input type="hidden" name="listname" value="optinrev_course"><input type="hidden" name="meta_web_form_id" value="1712095327"><input type="hidden" name="meta_message" value="1"><input type="hidden" name="meta_adtracking" value="Pro"><input type="hidden" name="redirect" value="http://www.optinrevolution.com/free-course/thankyou.php"><input type="hidden" name="meta_redirect_onlist" value=""><input type="hidden" name="meta_required" value="email"></div><div style="position: absolute; left: 0px; top: 0px; border: 1px solid transparent; display: none;display:none;"><input type="text" name="name" id="name" value="Enter Your Name..." style="font-family: arial !important;font-size:20px;color:#000000;padding-top:8px !important;padding-bottom:8px !important;width:261px;background-color:#FFFFCC !important;border:5px solid #666666;"></div><div style="position: absolute; left: 425px; top: 237px;border: 1px solid transparent; z-index: 5;"><input type="text" name="email" id="email" value="Enter Your Email..." style="font-family: arial !important;font-size:20px;color:#000000;padding-top:8px !important;padding-bottom:8px !important;width:261px;background-color:#FFFFCC !important;border:5px solid #666666;"></div></form>', 'optinrev_close_button' => 'left:722.5px;top:33.5;', 'optinrev_close_button_class' => 'close2', 'optinrev_dragging' => 1, 'optinrev_call_action_button' => 'get_access2', 'optinrev_excerpt' => '<div id="simplemodal-container" style="width: 720px; height: 410px; border: 8px solid rgba(0,119,255,0.75); background-color: #ffffff; -moz-border-radius: 25px; -webkit-border-radius: 25px; border-radius: 25px;"><div class="close2" id="close" style="left:704.5px; top:-29.5px;"> </div><div class="simplemodal-data" id="simplemodal-data"><div style="position: absolute; left: 421px; top: 297px; z-index: 5;"><img id="wm" alt="" src="' . $dir . 'assets/get_access2.png" border="0" /></div><div style="position: absolute; left: 270px; top: 128px;"><img id="stage_img_48" alt="" src="' . $dir . 'assets/v-arrows.gif" border="0" /></div><div style="position: absolute; left: 492px; top: 384px;"><img id="stage_img_47" alt="" src="' . $dir . 'assets/padlock.png" border="0" /></div><div style="position: absolute; left: 511px; top: 387px; z-index: 1;"><span style="font-size: 8pt;">Your Privacy Is Protected.</span></div><div style="position: absolute; left: 87px; top: 85px; z-index: 1; text-align: center;"><strong><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;">On Average, 8 Out Of 10 People Will Read Headline Copy</span></strong><br /><strong><span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 14pt;">But Only 2 Out Of 10 Will Read The Rest.</span></strong></div><div style="position: absolute; left: 4px; top: 10px; z-index: 1; text-align: center;"><span style="font-family: impact, chicago; font-size: 24pt; color: #ff0000;">Remember, Every Element Of Compelling Copy Has Just<br />One Purpose - To Get The Next Sentence Read!</span></div><div style="position: absolute; left: 422px; top: 185px; line-height: 16px; z-index: 1; text-align: center;"><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">Simply enter your best email below then click</span><br /><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">"Get Access Now!" button and get instant</span><br /><span style="font-size: 10pt; font-family: arial, helvetica, sans-serif;">access to _____________ - <strong><span style="color: #ff0000;">100% FREE</span></strong></span></div><div style="position: absolute; left: 416px; top: 137px; z-index: 1; text-align: center;"><span style="font-family: impact, chicago; font-size: 24pt; background-color: #ffff99;">FREE INSTANT ACCESS</span></div><div style="position: absolute; left: 7px; top: 116px; z-index: 2; border: 1px solid transparent;"><img id="stage_img_250" alt="" src="' . $dir . 'assets/girl.gif" border="0" /></div><div id="poweredby" style="position: absolute; left: 240px; top: 420px; color: white;"><a style="color: white !important;" href="http://goo.gl/0hf0ke" target="_blank" rel="nofollow">Powered</a> <span style="color: white;">by</span> <a style="color: white !important;" href="http://goo.gl/0hf0ke" target="_blank" rel="nofollow">Optin Revolution</a></div><form id="mce_getaccessed" action="https://www.optinrevolution.com/setup/?utm_source=plugin&utm_medium=not-setup&utm_campaign=lite" method="post" target="_blank"><div style="display: none;"><input type="hidden" name="listname" value="optinrev_course" /><input type="hidden" name="meta_web_form_id" value="1712095327" /><input type="hidden" name="meta_message" value="1" /><input type="hidden" name="meta_adtracking" value="Pro" /><input type="hidden" name="redirect" value="https://www.optinrevolution.com/free-course/thankyou.php" /><input type="hidden" name="meta_redirect_onlist" value="" /><input type="hidden" name="meta_required" value="email" /></div><div style="position: absolute; left: 0px; top: 0px; border: 1px solid transparent; display: none;"><input id="name" style="font-family: arial !important; font-size: 20px; color: #000000; padding-top: 8px !important; padding-bottom: 8px !important; width: 261px; background-color: #ffffcc !important; border: 5px solid #666666;" type="text" name="name" value="Enter Your Name..." /></div><div style="position: absolute; left: 425px; top: 237px; z-index: 5;"><input id="email" style="font-family: arial !important; font-size: 20px; color: #000000; padding-top: 8px !important; padding-bottom: 8px !important; width: 261px; background-color: #ffffcc !important; border: 5px solid #666666;" type="text" name="email" value="Enter Your Email..." /></div></form></div></div>', 'optinrev_email_form_opt' => 'aweber', 'optinrev_foptin_active' => 'aweber', 'optinrev_email_form' => array('aweber' => array('name' => 'Enter Your Name...', 'email' => 'Enter Your Email...', 'listname' => '', 'meta_web_form_id' => '', 'meta_message' => null, 'meta_adtracking' => '', 'redirect' => '', 'meta_redirect_onlist' => '', 'pixel_tracking_id' => '')), 'optinrev_input_enabled' => array('name' => 0), 'validate' => array('email' => 1), 'optinrev_inputh' => 50, 'optinrev_inputw' => 259, 'optinrev_inputtc' => '#000000', 'optinrev_inputfz' => 20, 'optinrev_inputc' => '#FFFFCC', 'optinrev_inputb' => '#666666', 'optinrev_inputbt' => 5, 'optinrev_wbg_color' => '#000000', 'optinrev_wbg_opacity' => 50, 'optinrev_delay' => 0, 'optinrev_pwbg_color' => '#FFFFFF', 'optinrev_border_color' => '#0077FF', 'optinrev_border_thickness' => 8, 'optinrev_border_opacity' => 75, 'optinrev_border_radius' => 25, 'optinrev_round_border' => 'on', 'optinrev_top_margin' => 127, 'optinrev_wwidth' => 720, 'optinrev_hheight' => 410, 'optinrev_link_color' => '#1122CC', 'optinrev_close_popup_image' => 'close2', 'optinrev_gotowebsite' => 'top', 'optinrev_cookie_delay' => 10);
                optinrev_update('optinrev_default', maybe_serialize($default_optin));
            }
            // mail providers
            optinrev_mail_providers();
        } else {
            if ($plugin_page == 'optinrevolution/optin-pro-settings') {
                optinrev_enqueue(2);
            }
        }
    }
    optinrev_update('optinrev_poweredby', 'true');
    optinrev_update('optinrev_optinrevolution/optin1_enabled', 'true');
    //set default;
    if (!optinrev_get('optinrev_show_popup')) {
        optinrev_update('optinrev_show_popup', 'show_always');
        //show always default
    }
}
Example #2
0
 function optinrev_action_callback()
 {
     if (function_exists('current_user_can') && !current_user_can('manage_options')) {
         die('');
     }
     //keep silent;
     global $wpdb;
     //saving setup
     if (isset($_POST['save_setup_settings'])) {
         //email form
         $mail_form = array('aweber' => 'Aweber', 'icontact' => 'Icontact', 'getresponse' => 'GetResponse', 'mailchimp' => 'Mailchimp', 'constantcontact' => 'Constant Contact', 'wysija' => 'Wysija');
         foreach ($mail_form as $k => $v) {
             //empty the others;
             if (isset($_POST['optinrev_optin_' . $k])) {
                 if (isset($_POST['optinrev_foptin_active']) && $_POST['optinrev_foptin_active'] !== $k) {
                     $_POST['optinrev_optin_' . $k] = null;
                 }
             }
         }
         if (!isset($_POST['optinrev_femail_validate'])) {
             $_POST['optinrev_femail_validate'] = 'off';
         }
         optinrev_update($_POST['save_setup_settings'], maybe_serialize($_POST));
         echo 'success';
         exit;
     }
     //enabled/disabled
     if (isset($_POST['optinrev_popup_enabled'])) {
         optinrev_update('optinrev_popup_enabled', $_POST['optinrev_popup_enabled']);
         exit;
     }
     //enabled/disabled
     if (isset($_POST['optinrev_popup']) && ($pop = strip_tags($_POST['optinrev_popup']))) {
         optinrev_update('optinrev_optinrevolution/optin1_enabled', $pop);
         exit;
     }
     //optinrev_show_where
     if (isset($_POST['optinrev_show_where']) && ($show_on = esc_html($_POST['optinrev_show_where']))) {
         optinrev_update('optinrev_show_where', $show_on);
         exit;
     }
     //showing popup
     if (isset($_POST['optinrev_show_popup']) && ($setp = esc_html($_POST['optinrev_show_popup']))) {
         $setp_ar = explode('|', $setp);
         $setv = $setp;
         if (count($setp_ar) > 0) {
             if ($setp_ar[0] == 'show_once_in') {
                 $et = strtotime('+' . $setp_ar[1] . ' day');
                 $setv = $setv . '|' . time() . '|' . $et;
             }
         }
         optinrev_update('optinrev_show_popup', $setv);
         if (function_exists('wp_cache_clear_cache')) {
             wp_cache_clear_cache();
         }
         exit;
     }
     //optinrev_pixel_tracking
     if (isset($_POST['optinrev_pixel_tracking'])) {
         optinrev_update('optinrev_pixel_tracking', esc_html($_POST['optinrev_pixel_tracking']));
         exit;
     }
     //delete img
     if (isset($_POST['optinrev_remove_img']) && ($img = esc_html($_POST['optinrev_remove_img']))) {
         optinrev_delete($img);
         echo json_encode(array('action' => 'success'));
         exit;
     }
     //add images
     if (isset($_POST['optinrev_add_image']) && ($add_img = esc_html($_POST['optinrev_add_image']))) {
         //images from wp/content/uploads
         $img_id = explode('_', $add_img);
         $img_id = $img_id[2];
         $add_img_id = $_POST['optinrev_curr_page'] . '_img_uid_' . optinrev_unique_id() . '_' . $img_id;
         $img = optinrev_get_media($img_id);
         $imgurl = parse_url($img->guid);
         optinrev_update($add_img, basename($imgurl['path']) . '|' . $add_img);
         echo json_encode(array('action' => 'success', 'image' => '//' . $_SERVER['HTTP_HOST'] . $imgurl['path']));
         exit;
     }
     //reset
     if (isset($_POST['optinrev_popup_reset']) && intval($_POST['optinrev_popup_reset'])) {
         optinrev_update('optinrevolution/optin1', optinrev_get('optinrev_default'));
         optinrev_update('optinrev_active_action_button', 'get_access2.png');
         $tb_options = $wpdb->prefix . 'optinrev';
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", '%_img_uid_%'));
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", 'stage_img_%'));
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", 'action_button_%'));
         exit('success');
     }
     //get the validator
     if (isset($_POST['optinrev_mce_validator']) && ($page = esc_html($_POST['optinrev_mce_validator']))) {
         $p = unserialize(optinrev_get($page));
         echo json_encode($p['optinrev_input_validator']);
         exit;
     }
     //mail provider form
     if (isset($_POST['optinrev_mail_webform']) && ($cur_page = esc_html($_POST['optinrev_mail_webform']))) {
         //optin setup
         $optin = unserialize(optinrev_get($cur_page));
         if ($optin) {
             //providers
             $prov = $_POST['optinrev_mail_provider'];
             $mpro = unserialize(optinrev_get('optinrev_mail_providers'));
             $mdta = explode(',', $mpro[$prov]['input']);
             //input text
             $inputs = isset($optin['optinrev_email_form'][$prov]) ? $optin['optinrev_email_form'][$prov] : null;
             $inputs_enabled = isset($optin['optinrev_input_enabled']) ? $optin['optinrev_input_enabled'] : '';
             $htm = '';
             foreach ($mdta as $v) {
                 $fable = isset($inputs_enabled[$v]) ? $inputs_enabled[$v] : false;
                 $vl = isset($inputs[$v]) ? $inputs[$v] : '';
                 $lbl = ucwords(str_replace('_', ' ', $v));
                 //Input label
                 $lbl = str_replace('Fields Email', 'Email', $lbl);
                 $reqvalid = $req = $autotxt = $ismchimp = '';
                 $value_email = array('email', 'fields_email');
                 $valid_field = array('email', 'fields_email');
                 if (in_array($v, $valid_field)) {
                     $req = isset($optin['validate'][$v]) ? 'checked' : '';
                     $reqvalid = 'Validate&nbsp;<input type="checkbox" name="validate[' . $v . ']" value="1" ' . $req . '/>';
                 }
                 if ($prov == 'mailchimp') {
                     if ($lbl == 'Mcaction') {
                         $ismchimp = '<div class="row"><label>&nbsp;</label><span class="note">Example Value: <b>mailchimp.us1.list-manage.com</b> ( Replace with your url with your action value information )</span></div>';
                     }
                     $vl = str_replace('http://', '', $vl);
                     $lbl = ucfirst(str_replace('Mc', '', $lbl));
                 }
                 $name_sel = '';
                 $txt = '';
                 if (in_array($v, $value_email)) {
                     if (empty($vl)) {
                         $vl = 'Enter Your Email...';
                     }
                     $txt = 'onfocus="wtfn.intips(this, \'' . $vl . '\',1);" onblur="wtfn.intips(this, \'' . $vl . '\',0);"';
                 }
                 //if has an 'id'
                 $lbl = str_replace(' Id', ' ID', $lbl);
                 $htm .= '<div class="row"><label>' . $lbl . '</label><input type="text" name="optinrev_email_form[' . $_POST['optinrev_mail_provider'] . '][' . $v . ']" ' . $txt . ' value="' . $vl . '" size="40">' . $ismchimp . '&nbsp;' . $reqvalid . '&nbsp;' . $name_sel . '</div>';
             }
             echo $htm;
         }
         exit;
     }
     //Member verification
     if (isset($_POST['authenticate']) && ($user = esc_html($_POST['authenticate']))) {
         include_once ABSPATH . 'wp-includes/class-IXR.php';
         parse_str(str_replace('amp;', '', $user), $post);
         $res = 'invalid_user';
         if (empty($post['amember_email'])) {
             $res = 'invalid_user';
             exit;
         }
         if (!strpos($post['amember_email'], '@')) {
             $res = 'invalid_user';
             exit;
         }
         $client = new IXR_Client(OPTINREV_XMLRPC_URL);
         if ($client->query('proplug.is_user_authorized', $post['amember_email'], optinrev_get_host())) {
             $res = $client->getResponse();
         } else {
             $res = 2;
         }
         $res = $res == 1 ? 'authorized' : $res;
         $res = $res == 2 ? 'invalid_member' : $res;
         $res = $res == 3 ? 'invalid_login' : $res;
         exit(sprintf('%s', $res));
     }
     //Save the info
     if (isset($_POST['pro_authorized']) && ($pro = esc_html($_POST['pro_authorized']))) {
         parse_str(str_replace('amp;', '', $pro), $post);
         optinrev_update('optinrev_pro_authorized', serialize($post));
         echo 'valid';
         exit;
     }
     //set autosave
     if (isset($_POST['optinrev_autosave']) && ($autosave = esc_html($_POST['optinrev_autosave']))) {
         optinrev_update('optinrev_autosave', $autosave);
         exit;
     }
     //set poweredby
     if (isset($_POST['optinrev_poweredby']) && ($poweredby = esc_html($_POST['optinrev_poweredby']))) {
         optinrev_update('optinrev_poweredby', $poweredby);
         exit;
     }
     if (isset($_POST['optinrev_showmobile']) && ($showmobile = esc_html($_POST['optinrev_showmobile']))) {
         optinrev_update('optinrev_showmobile', $showmobile);
         exit;
     }
     //optinrev_add_image_briefcase
     if (isset($_POST['optinrev_add_image_briefcase']) && ($img = esc_html($_POST['optinrev_add_image_briefcase']))) {
         $img_id = esc_html($_POST['optinrev_curr_page']) . '_images_' . optinrev_unique_id();
         optinrev_update($img_id, $img);
         exit;
     }
     //optinrev_del_image_briefcase
     if (isset($_POST['optinrev_del_image_briefcase']) && ($img = esc_html($_POST['optinrev_del_image_briefcase']))) {
         $img_id = esc_html($_POST['optinrev_curr_page']) . '_delete_images_' . optinrev_unique_id();
         optinrev_update($img_id, $img);
         exit;
     }
     //optinrev_add_action button_briefcase
     if (isset($_POST['optinrev_add_button_briefcase']) && ($img = esc_html($_POST['optinrev_add_button_briefcase']))) {
         optinrev_update('optinrev_add_button_briefcase', $img);
         exit;
     }
     //remove an image to the stage
     if (isset($_POST['optinrev_remove_object']) && ($img_id = esc_html($_POST['optinrev_remove_object']))) {
         optinrev_delete($img_id);
         exit;
     }
     //getimage size
     if (isset($_POST['optinrev_getimagesize']) && ($img = esc_html($_POST['optinrev_getimagesize']))) {
         $is_cdn = isset($_POST['cdn']) ? '' : $_SERVER['DOCUMENT_ROOT'];
         if (list($width, $height) = @getimagesize($is_cdn . $img)) {
             $imgd = array('width' => $width, 'height' => $height);
             echo json_encode($imgd);
         } else {
             echo '0';
         }
         exit;
     }
     //reset action button
     if (isset($_POST['optinrev_reset_action_button'])) {
         optinrev_update('optinrev_active_action_button', 'get_access2.png');
         exit;
     }
     //Email form reset
     if (isset($_POST['optinrev_emailform_reset']) && intval($_POST['optinrev_emailform_reset'])) {
         $optin = maybe_unserialize(optinrev_get('optinrevolution/optin1'));
         $optin['optinrev_optin_aweber'] = null;
         $optin['optinrev_optin_icontact'] = null;
         $optin['optinrev_optin_getresponse'] = null;
         $optin['optinrev_optin_mailchimp'] = null;
         $optin['optinrev_optin_constantcontact'] = null;
         $optin['wysija_list_id'] = null;
         $optin['optinrev_femail_validate'] = null;
         $optin['optinrev_foptin_active'] = null;
         $optin['optinrev_foptin_form_active'] = null;
         optinrev_update('optinrevolution/optin1', serialize($optin));
         exit;
     }
     //Factory Reset
     if (isset($_POST['optinrev_factory_reset']) && intval($_POST['optinrev_factory_reset'])) {
         optinrev_update('optinrevolution/optin1', optinrev_get('optinrev_default'));
         optinrev_update('optinrev_active_action_button', 'get_access2.png');
         $tb_options = $wpdb->prefix . 'optinrev';
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", '%_img_uid_%'));
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", 'stage_img_%'));
         $wpdb->query($wpdb->prepare("delete from {$tb_options} where name like %s", 'action_button_%'));
         exit;
     }
 }