echo optinrev_post('optinrev_inputh', true) ? optinrev_post('optinrev_inputh', true) : 50; ?> ',optinrev_inputw = '<?php echo optinrev_post('optinrev_inputw', true) ? optinrev_post('optinrev_inputw', true) : 160; ?> ',optinrev_inputbt = '<?php echo optinrev_post('optinrev_inputbt', true) ? optinrev_post('optinrev_inputbt', true) : 1; ?> ',optinrev_inputfz = '<?php echo optinrev_post('optinrev_inputfz', true) ? optinrev_post('optinrev_inputfz', true) : 12; ?> ',mailpro = <?php echo $mailpro; ?> , is_upload = '<?php echo $is_upload; ?> ', optinrev_link_color = '<?php echo optinrev_post('optinrev_link_color', true) ? optinrev_post('optinrev_link_color', true) : '#1122CC'; ?> ', optinrev_link_underline = '<?php echo optinrev_post('optinrev_link_underline', true) == 'on' ? optinrev_post('optinrev_link_underline', true) : ''; ?> ', optinrev_ctcurl='<?php echo $optinrev_ctcurl; ?> ';/* ]]> */ <?php } else { die; }
function optinrev_setup() { global $plugin_page; $dir = plugin_dir_url(__FILE__); //default button images $def_images = unserialize(optinrev_get('optinrev_default_images')); $get_access_btns = $def_images['get_access']; $close_btns = $def_images['close_btn']; //configs $optin = optinrev_popups(); if (isset($plugin_page)) { $_POST = unserialize(optinrev_get($plugin_page)); } $is_call_action = optinrev_post('optinrev_call_action_button', true) ? optinrev_post('optinrev_call_action_button', true) : 'get_access1'; $is_close_btn = optinrev_post('optinrev_close_popup_image', true) ? optinrev_post('optinrev_close_popup_image', true) : 'close1'; $action_btn_view = $get_access_btns[$is_call_action]; //editing content $content = optinrev_post('optinrev_excerpt', true) ? optinrev_post('optinrev_excerpt', true) : ''; //cleaned scheme $content = str_replace(array('http:', 'https:'), '', $content); //email form $mail_form = array('aweber' => 'Aweber', 'icontact' => 'Icontact', 'getresponse' => 'GetResponse', 'mailchimp' => 'Mailchimp', 'constantcontact' => 'Constant Contact', 'wysija' => 'MailPoet'); $email_form_opt = optinrev_post('optinrev_email_form_opt', true) ? optinrev_post('optinrev_email_form_opt', true) : 'virtualsender'; $foptin = optinrev_post('optinrev_foptin_active', 1) ? optinrev_post('optinrev_foptin_active', 1) : 'aweber'; $foptin_form = optinrev_post('optinrev_foptin_form_active', 1) ? optinrev_post('optinrev_foptin_form_active', 1) : ''; $femail_validate = optinrev_post('optinrev_femail_validate', 1) ? optinrev_post('optinrev_femail_validate', 1) : ''; $wylist_id = optinrev_post('wysija_list_id', 1) ? optinrev_post('wysija_list_id', 1) : ''; //input text $inputs = isset($_POST['optinrev_email_form']) ? $_POST['optinrev_email_form'] : ''; $inputs_enabled = isset($_POST['optinrev_input_enabled']) ? $_POST['optinrev_input_enabled'] : ''; //goto website button location $gw = optinrev_post('optinrev_gotowebsite', true) ? optinrev_post('optinrev_gotowebsite', true) : 'top'; $optinrev_delay = optinrev_post('optinrev_delay', true) ? optinrev_post('optinrev_delay', true) : 0; $optinrev_ctcurl = isset($_POST['optinrev_ctcurl']) ? $_POST['optinrev_ctcurl'] : ''; ?> <div id="optin-revolution" class="opt-setup"> <div class="get-help">Get Help : <a href="<?php echo OPTINREV_TUTORIAL_LINK; ?> " target="_blank">Tutorials</a> | <a href="https://www.optinrevolution.com/?utm_source=plugin&utm_medium=link&utm_campaign=upgrade" title="Upgrade to Pro" target="_blank"><b>Upgrade to Pro</b></a></div> <div class="wrap fform"> <div class="icon32" id="icon-options-general"><br /></div><?php echo "<h2>" . __($optin[$plugin_page] . ' Settings', 'wotp_trdom') . "</h2>"; ?> <br /> <div id="post-message" class="updated"></div> <?php echo optinrev_banner(); ?> <form name="optinrev_setup_form" id="optinrev_setup_form" method="POST" action="admin-ajax.php"> <input type="hidden" name="action" value="optinrev_action"/> <input type="hidden" name="save_setup_settings" id="page" value="<?php echo $plugin_page; ?> "/> <input type="hidden" name="optinrev_data" id="optinrev_data"/> <input type="hidden" name="optinrev_excerpt" id="optinrev_excerpt"/> <input type="hidden" name="optinrev_close_button" id="optinrev_close_button" value="<?php optinrev_post('optinrev_close_button'); ?> "/> <input type="hidden" name="optinrev_close_button_class" id="optinrev_close_button_class"/> <input type="hidden" name="optinrev_dragging" id="optinrev_dragging" value="<?php optinrev_post('optinrev_dragging'); ?> "/> <input type="hidden" name="optinrev_call_action_button" id="optinrev_call_action_button" value="<?php echo $is_call_action; ?> "> <input type="hidden" name="optinrev_foptin_active" id="optinrev_foptin_active" value="<?php echo $foptin; ?> "> <input type="hidden" name="optinrev_foptin_form_active" id="optinrev_foptin_form_active" value="<?php echo $foptin_form; ?> "> <div> <div class="left" style="margin-top:5px;"> <input type="button" name="action_reset" class="optinrev_xbutton" id="action_reset" value="<?php _e('Reset'); ?> " /> </div> <div class="right" id="wotbuttons"> <span class="spin" id="save_setting_spin"></span> <input type="button" class="optinrev_button" name="action_save_settings" value="<?php _e('Save Settings'); ?> " onclick="wtfn.save(1);" /> <input alt="" title="<?php echo $optin[$plugin_page]; ?> Preview" id="action_preview" class="optinrev_button" type="button" value="Preview" /> </div> </div> <div class="clear"></div><br /> <div class="col1"> <div class="optinrev-tinymce-editor"> <textarea id="optinrev_excerpt_content"><?php echo $content; ?> </textarea><br /> </div> <p><?php echo optinrev_banner2(); ?> </p> </div> <div class="col2"> <div class="need-support-box"> <h2>Need support?</h2> <p>If you are having problems with this plugin, please talk about them in the <a href="<?php echo OPTINREV_SUPPORT; ?> " target="_blank">Support forums</a>.</p> </div> <div class="social-box"> <h2>Need a email provider? We support:</h2> <?php optinrev_email_support(); ?> <div class="clear"></div> </div> </div> <div class='clear'></div> <div id="icon-themes" class="icon32"><br></div> <h2 class="nav-tab-wrapper" id="optinrev-nav-tab"> <a href="#email-forms" class="nav-tab nav-tab-active" data-tab="1" onclick="wtfn.tabs(this);">Email Forms</a> <a href="#input-fields" class="nav-tab" data-tab="2" onclick="wtfn.tabs(this);">Input Fields</a> <a href="#background" class="nav-tab" data-tab="3" onclick="wtfn.tabs(this);">Background</a> <a href="#popup" class="nav-tab" data-tab="4" onclick="wtfn.tabs(this);">Popup</a> </h2> <div class="opt-row"> <div class="optinrev-settab1"> <div class="inmsg"></div><br /> <div class="optinrev_mail_providers"> <div class="box1"> <ul id="femail_tab"> <?php foreach ($mail_form as $k => $v) { $sel = $foptin == $k ? 'active' : ''; echo '<li id="' . $k . '" class="' . $sel . '" data-title="' . $v . '"><img src="' . OPTINREV_DIR . 'images/' . ($k === 'constantcontact' ? 'constant_contact' : $k) . '.png" border="0"/></li>'; } //check active form ?> </ul> </div> <div class="box2"> <ul id="foptin_box"> <?php foreach ($mail_form as $k => $v) { $sel_optin = $foptin !== $k || $foptin_form ? 'display:none' : ''; if ($k !== 'wysija') { ?> <li style="<?php echo $sel_optin; ?> " id="optinrev_optin_<?php echo $k; ?> "> <h2>Please Fill in the Following Details:</h2> <h3>Enter your html opt-in code below and we'll hook up your forms to the template:</h3> <?php if ($k == 'constantcontact') { ?> <div class="optinrev_ctc">Enter your share url to form <input type="text" name="optinrev_ctcurl" id="optinrev_ctcurl" data-ctc="optinrev_optincode_<?php echo $k; ?> " size="30" onblur="wtfn.getctc_form(this);" value="<?php echo $optinrev_ctcurl; ?> "> <em>Don't have a url. <a href="https://ui.constantcontact.com/rnavmap/em/contacts/signuptools" target="_blank" rel="nofollow">Get your share url here.</a></em></div> <?php } ?> <textarea name="optinrev_optin_<?php echo $k; ?> " id="optinrev_optincode_<?php echo $k; ?> " cols="100" rows="12"><?php echo optinrev_post('optinrev_optin_' . $k, 1) ? htmlspecialchars(optinrev_post('optinrev_optin_' . $k, 1)) : ''; ?> </textarea> <div class="row"><input type="button" name="save_wait" class="optinrev_xbutton" value="Optin Code Update" onclick="wtfn.optin_form('<?php echo $k; ?> ');"></div> </li> <?php } else { ?> <li style="<?php echo $sel_optin; ?> " id="optinrev_optin_<?php echo $k; ?> "> <?php if (defined('WYSIJA')) { $modelL = WYSIJA::get('list', 'model'); $listsdata = $modelL->get(array('list_id', 'name'), array('is_enabled' => '1')); $htm = ''; $htm .= '<h3>MailPoet Mailing List</h3>'; $htm .= '<p><select name="wysija_list_id" id="wysija_list_id" style="width:150px;">'; $htm .= '<option value="">--Select List ID--</option>'; foreach ($listsdata as $list) { $htm .= '<option value="' . $list['list_id'] . '" ' . ($wylist_id === $list['list_id'] ? 'selected' : '') . '>' . $list['name'] . "</option>"; } echo $htm .= '</select></p>'; ?> <div class="row"><input type="button" name="save_wait" class="optinrev_xbutton" value="Optin Code Update" onclick="wtfn.optin_form('<?php echo $k; ?> ');"></div> <?php } else { ?> <h2><em>No MailPoet plugin has been found.</em></h2><br /> <?php } ?> </li> <?php } } ?> </ul> <?php //email value; $optinrev_email = optinrev_post('optinrev_email', 1) ? optinrev_post('optinrev_email', 1) : 'Enter Your Email...'; ?> <div class="foptin_ifo" <?php echo $foptin_form ? 'style="display:block"' : ''; ?> > <h3>Your <span id="foptin_ifo_lbl"><b><?php echo $mail_form[$foptin]; ?> </b></span> form code is now linked to Optin Revolution Lite</h3><br /><br /><br /> <div class="foptin_active"><h2>Active</h2></div><br /><br /><br /> <p>Email <input type="text" name="optinrev_email" id="femail" value="<?php echo $optinrev_email; ?> " size="30" onfocus="if (this.value=='Enter Your Email...') { this.value = ''; }" onblur="wtfn.optin_form_email(this);"> <input type="checkbox" name="optinrev_femail_validate" id="femail_validate" <?php echo $femail_validate == 'on' ? 'checked' : ''; ?> > Validate</p> <br /><br /> <div class="foptin_deactivate"><h3><a href="javascript:;" onclick="wtfn.optin_form_deactivate();">Deactivate</a></h3></div> <br /><br /><br /> </div> <div class="clear"></div> </div><!--box2--> <div class="clear"></div> </div><br /> </div> <div class="optinrev-settab2"> <h3><?php _e('Input Fields'); ?> </h3> <div class="row"><label><?php _e('Height'); ?> </label> <div class="fbox"><input type="text" name="optinrev_inputh" id="optinrev_inputh" value="<?php echo optinrev_post('optinrev_inputh', true) ? optinrev_post('optinrev_inputh', true) : '50'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_inpuths" class="wjui"></div></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Width'); ?> </label> <div class="fbox"><input type="text" name="optinrev_inputw" id="optinrev_inputw" value="<?php echo optinrev_post('optinrev_inputw', true) ? optinrev_post('optinrev_inputw', true) : '160'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_inputws" class="wjui"></div></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Text Color'); ?> </label><input type="text" name="optinrev_inputtc" class="color {hash:true}" value="#<?php echo optinrev_post('optinrev_inputtc', true) ? optinrev_post('optinrev_inputtc', true) : '000000'; ?> " size="10"></div> <div class="row"><label><?php _e('Font Size'); ?> </label> <div class="fbox"><input type="text" name="optinrev_inputfz" id="optinrev_inputfz" value="<?php echo optinrev_post('optinrev_inputfz', true) ? optinrev_post('optinrev_inputfz', true) : '12'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_inputfzs" class="wjui"></div></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Background Color'); ?> </label><input type="text" name="optinrev_inputc" class="color {hash:true}" value="#<?php echo optinrev_post('optinrev_inputc', true) ? optinrev_post('optinrev_inputc', true) : 'ffffff'; ?> " size="10"></div> <div class="row"><label><?php _e('Border Color'); ?> </label><input type="text" name="optinrev_inputb" class="color {hash:true}" value="#<?php echo optinrev_post('optinrev_inputb', true) ? optinrev_post('optinrev_inputb', true) : '000000'; ?> " size="10"></div> <div class="row"><label><?php _e('Border Thickness'); ?> </label> <div class="fbox"><input type="text" name="optinrev_inputbt" id="optinrev_inputbt" value="<?php echo optinrev_post('optinrev_inputbt', true) ? optinrev_post('optinrev_inputbt', true) : '1'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_inputbts" class="wjui"></div></div> <div class="clear"></div> </div> </div> <div class="optinrev-settab3"> <h3><?php _e('Background'); ?> </h3> <div class="row"><label><?php _e('Background Color'); ?> </label><input type="text" name="optinrev_wbg_color" id="optinrev_wbg_color" class="color {hash:true}" value="<?php optinrev_post('optinrev_wbg_color'); ?> " size="10"></div> <div class="row"><label><?php _e('Background Opacity'); ?> </label> <div class="fbox"><input type="text" name="optinrev_wbg_opacity" id="optinrev_wbg_opacity" value="<?php echo optinrev_post('optinrev_wbg_opacity', true) ? optinrev_post('optinrev_wbg_opacity', true) : '0'; ?> " size="10" readonly>%</div> <div class="wjui-box"><div id="wbg_opacity_slider" class="wjui"></div></div> <div class="clear"></div> </div> </div> <div class="optinrev-settab4"> <h3><?php _e('Popup'); ?> </h3> <div class="row"><label><?php _e('Seconds Delay'); ?> </label> <div class="fbox"><input type="text" name="optinrev_delay" id="optinrev_vdelay" value="<?php echo optinrev_post('optinrev_delay', true) ? optinrev_post('optinrev_delay', true) : '0'; ?> " size="10" readonly>Sec</div> <div class="wjui-box" style="width: 440px;"><div id="optinrev_sdelay" class="wjui"></div> <span id="optinrev_need_longer" style="<?php echo $optinrev_delay > 0 ? '' : 'display:none;'; ?> ">Need longer than 15 seconds? <a href="https://www.optinrevolution.com/?utm_source=plugin&utm_medium=link&utm_campaign=15-seconds" target="_blank">Upgrade to Pro</a></span></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Background Color'); ?> </label><input type="text" name="optinrev_pwbg_color" class="color {hash:true}" value="<?php echo optinrev_post('optinrev_pwbg_color', true) ? optinrev_post('optinrev_pwbg_color', true) : 'ffffff'; ?> " size="10"></div> <div class="row"><label><?php _e('Border Color'); ?> </label><input type="text" name="optinrev_border_color" class="color {hash:true}" value="<?php echo optinrev_post('optinrev_border_color', true) ? optinrev_post('optinrev_border_color', true) : '000000'; ?> " size="10"></div> <div class="row"><label><?php _e('Border Thickness'); ?> </label> <div class="fbox"><input type="text" name="optinrev_border_thickness" id="optinrev_vborder_thickness" value="<?php echo optinrev_post('optinrev_border_thickness', true) ? optinrev_post('optinrev_border_thickness', true) : '1'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_sborder_thickness" class="wjui"></div></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Border Opacity'); ?> </label> <div class="fbox"><input type="text" name="optinrev_border_opacity" id="optinrev_border_opacity" value="<?php echo optinrev_post('optinrev_border_opacity', true) ? optinrev_post('optinrev_border_opacity', true) : '0'; ?> " size="10" readonly>%</div> <div class="wjui-box"><div id="border_opacity_slider" class="wjui"></div></div> <div class="clear"></div> </div> <?php if (optinrev_post('optinrev_round_border', true) == 'on') { ?> <div class="row" id="_nbr"><label class="lbladmin"><?php _e('Border Radius'); ?> </label> <div class="fbox"><input type="text" name="optinrev_border_radius" id="optinrev_border_radius" value="<?php echo optinrev_post('optinrev_border_radius', true) ? optinrev_post('optinrev_border_radius', true) : '0'; ?> " size="10" readonly>%</div> <div class="wjui-box"><div id="border_radius_slider" class="wjui"></div></div> <div class="clear"></div> </div> <?php } ?> <div><label class="lbladmin"><?php _e('Rounded Border'); ?> </label><div class="fbox"><input type="checkbox" name="optinrev_round_border" id="optinrev_round_border" <?php echo optinrev_post('optinrev_round_border', true) == 'on' ? 'checked' : ''; ?> /></div><div class="clear"></div></div> <div class="row"><label><?php _e('Popup Top Margin'); ?> </label> <div class="fbox"><input type="text" name="optinrev_top_margin" id="optinrev_vtop_margin" value="<?php echo optinrev_post('optinrev_top_margin', true) ? optinrev_post('optinrev_top_margin', true) : '0'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_stop_margin" class="wjui"></div></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Popup Width'); ?> </label> <div class="fbox"><input type="text" name="optinrev_wwidth" id="optinrev_vwidth" value="<?php echo optinrev_post('optinrev_wwidth', true) ? optinrev_post('optinrev_wwidth', true) : '900'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_swidth" class="wjui"></div> <span class="description">Maximum width = 900px</span></div> <div class="clear"></div> </div> <div class="row"><label><?php _e('Popup Height'); ?> </label> <div class="fbox"><input type="text" name="optinrev_hheight" id="optinrev_vheight" value="<?php echo optinrev_post('optinrev_hheight', true) ? optinrev_post('optinrev_hheight', true) : '600'; ?> " size="10" readonly>px</div> <div class="wjui-box"><div id="optinrev_sheight" class="wjui"></div> <span class="description">Maximum height = 600px</span></div> <div class="clear"></div> </div> <div class="clear"></div> <div class="row"><label><?php _e('Action Button'); ?> </label><a href="javascript:;" class="button" id="reset_cab">Reset</a></div><div class="clear"></div> <div class="row"><label><h3><?php _e('Hyperlink'); ?> </h3></label><span> </span></div><br /> <div class="row"><label><?php _e('Hyperlink Color'); ?> </label><input type="text" name="optinrev_link_color" id="optinrev_link_color" class="color {hash:true}" value="<?php echo optinrev_post('optinrev_link_color', true) ? optinrev_post('optinrev_link_color', true) : '1122CC'; ?> " size="10"> <span>Link, visited, hover and active</span></div> <div><label class="lbladmin"><?php _e('Hyperlink Underline'); ?> </label><div class="fbox"><input type="checkbox" name="optinrev_link_underline" id="optinrev_link_underline" <?php echo optinrev_post('optinrev_link_underline', true) == 'on' ? 'checked' : ''; ?> /></div><div class="clear"></div></div> <br /> <h3><?php _e('Close Popup Image'); ?> </h3> <div> <p> <?php $cb = 0; foreach ($close_btns as $bk => $bv) { $sel = $is_close_btn == $bk ? 'checked' : ''; ?> <input type="radio" name="optinrev_close_popup_image" value="<?php echo $bk; ?> " <?php echo $sel; ?> > <img src="<?php echo $bv; ?> " border="0"/> <?php if ($cb == 5) { echo '<div> </div>'; } ?> <?php $cb++; } ?> <p>Location Top / Bottom <select name="optinrev_gotowebsite" id="optinrev_gotowebsite" onchange="wtfn.gw_loc_btn(this.value);"> <option value="top" <?php echo $gw == 'top' ? 'selected' : ''; ?> >Top</option> <option value="bottom" <?php echo $gw == 'bottom' ? 'selected' : ''; ?> >Bottom</option> </select></p> </p> </div> </div> </div><!--optrow--> <br /> </form> </div> </div> <?php }