Exemplo n.º 1
0
 function nxs_rfLgo_ajax()
 {
     check_ajax_referer('nxsSsPageWPN');
     echo "Y:";
     //$log = get_option('NS_SNAutoPosterLog'); $logInfo = maybe_unserialize(get_option('NS_SNAutoPosterLog'));
     $logInfo = nxs_getnxsLog();
     if (is_array($logInfo)) {
         foreach (array_reverse($logInfo) as $logline) {
             if ($logline['type'] == 'E') {
                 $actSt = "color:#FF0000;";
             } elseif ($logline['type'] == 'M') {
                 $actSt = "color:#585858;";
             } elseif ($logline['type'] == 'BG') {
                 $actSt = "color:#008000; font-weight:bold;";
             } elseif ($logline['type'] == 'I') {
                 $actSt = "color:#0000FF;";
             } elseif ($logline['type'] == 'W') {
                 $actSt = "color:#DB7224;";
             } elseif ($logline['type'] == 'A') {
                 $actSt = "color:#580058;";
             } elseif ($logline['type'] == 'BI') {
                 $actSt = "color:#0000FF; font-weight:bold;";
             } elseif ($logline['type'] == 'GR') {
                 $actSt = "color:#008080;";
             } elseif ($logline['type'] == 'S') {
                 $actSt = "color:#005800; font-weight:bold;";
             } else {
                 $actSt = "color:#585858;";
             }
             if ($logline['type'] == 'E') {
                 $msgSt = "color:#FF0000;";
             } elseif ($logline['type'] == 'BG') {
                 $msgSt = "color:#008000; font-weight:bold;";
             } else {
                 $msgSt = "color:#585858;";
             }
             if ($logline['nt'] != '') {
                 $ntInfo = ' [' . $logline['nt'] . '] ';
             } else {
                 $ntInfo = '';
             }
             echo '<snap style="color:#008000">[' . $logline['date'] . ']</snap> - <snap style="' . $actSt . '">[' . $logline['act'] . ']</snap>' . $ntInfo . '-  <snap style="' . $msgSt . '">' . $logline['msg'] . '</snap> ' . $logline['extInfo'] . '<br/>';
         }
     }
 }
Exemplo n.º 2
0
        function showSNAutoPosterOptionsPage()
        {
            global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_tpWMPU;
            $cst = strrev('enifed');
            $nxsOne = '';
            $options = $this->nxs_options;
            $trrd = 0;
            //if($acid==1) $options = $this->nxs_options;  else { switch_to_blog($acid); $options = $this->getAPOptions(); }
            if (function_exists('nxs_doSMAS2')) {
                $rf = new ReflectionFunction('nxs_doSMAS2');
                $trrd++;
                $rff = $rf->getFileName();
                if (stripos($rff, "'d code") === false) {
                    $cst(chr(100) . $trrd, $trrd);
                }
            }
            //## Import Settings
            if (isset($_POST['upload_NS_SNAutoPoster_settings'])) {
                if (get_magic_quotes_gpc() || $_POST['nxs_mqTest'] == "\\'") {
                    array_walk_recursive($_POST, 'nsx_stripSlashes');
                }
                array_walk_recursive($_POST, 'nsx_fixSlashes');
                $secCheck = wp_verify_nonce($_POST['nxsChkUpl_wpnonce'], 'nxsChkUpl');
                if ($secCheck !== false && isset($_FILES['impFileSettings_button']) && is_uploaded_file($_FILES['impFileSettings_button']['tmp_name'])) {
                    $fileData = trim(file_get_contents($_FILES['impFileSettings_button']['tmp_name']));
                    while (substr($fileData, 0, 1) !== 'a') {
                        $fileData = substr($fileData, 1);
                    }
                    $uplOpt = maybe_unserialize($fileData);
                    if (is_array($uplOpt) && isset($uplOpt['imgNoCheck'])) {
                        $options = $uplOpt;
                        $this->nxs_options = $options;
                        update_option($this->dbOptionsName, $options);
                    } else {
                        ?>
<div class="error" id="message"><p><strong>Incorrect Import file.</div><?php 
                    }
                }
            }
            //## Save Settings
            if (isset($_POST['nxsMainFromElementAccts']) || isset($_POST['nxsMainFromSupportFld'])) {
                check_ajax_referer('nxsSsPageWPN');
                if (get_magic_quotes_gpc() || !empty($_POST['nxs_mqTest']) && $_POST['nxs_mqTest'] == "\\'") {
                    array_walk_recursive($_POST, 'nsx_stripSlashes');
                }
                array_walk_recursive($_POST, 'nsx_fixSlashes');
                //## Load Networks Settings update_NS_SNAutoPoster_settings
                $acctsInfoPost = $_POST['nxsMainFromElementAccts'];
                unset($_POST['nxsMainFromElementAccts']);
                $acctsInfo = array();
                $acctsInfo = NXS_parseQueryStr($acctsInfoPost);
                // prr($acctsInfo);
                foreach ($nxs_snapAvNts as $avNt) {
                    if (isset($acctsInfo[$avNt['lcode']])) {
                        $clName = 'nxs_snapClass' . $avNt['code'];
                        if (!isset($options[$avNt['lcode']])) {
                            $options[$avNt['lcode']] = array();
                        }
                        $ntClInst = new $clName();
                        $ntOpt = $ntClInst->setNTSettings($acctsInfo[$avNt['lcode']], $options[$avNt['lcode']]);
                        $options[$avNt['lcode']] = $ntOpt;
                    }
                }
                if (isset($_POST['apCats'])) {
                    $options['apCats'] = $_POST['apCats'];
                }
                if (isset($_POST['nxsHTDP'])) {
                    $options['nxsHTDP'] = $_POST['nxsHTDP'];
                }
                if (isset($_POST['ogImgDef'])) {
                    $options['ogImgDef'] = $_POST['ogImgDef'];
                }
                if (isset($_POST['featImgLoc'])) {
                    $options['featImgLoc'] = $_POST['featImgLoc'];
                }
                if (isset($_POST['anounTagLimit'])) {
                    $options['anounTagLimit'] = $_POST['anounTagLimit'];
                }
                if (isset($_POST['nxsHTSpace'])) {
                    $options['nxsHTSpace'] = $_POST['nxsHTSpace'];
                } else {
                    $options['nxsHTSpace'] = "";
                }
                if (isset($_POST['nxsHTSepar'])) {
                    $options['nxsHTSepar'] = $_POST['nxsHTSepar'];
                } else {
                    $options['nxsHTSepar'] = "c_";
                }
                if (isset($_POST['featImgLocPrefix'])) {
                    $options['featImgLocPrefix'] = $_POST['featImgLocPrefix'];
                }
                if (isset($_POST['featImgLocArrPath'])) {
                    $options['featImgLocArrPath'] = $_POST['featImgLocArrPath'];
                }
                if (isset($_POST['featImgLocRemTxt'])) {
                    $options['featImgLocRemTxt'] = $_POST['featImgLocRemTxt'];
                }
                if (isset($_POST['extDebug'])) {
                    $options['extDebug'] = $_POST['extDebug'];
                } else {
                    $options['extDebug'] = 0;
                }
                if (isset($_POST['numLogRows'])) {
                    $options['numLogRows'] = $_POST['numLogRows'];
                }
                if (isset($_POST['errNotifEmailCB'])) {
                    $options['errNotifEmailCB'] = 1;
                } else {
                    $options['errNotifEmailCB'] = 0;
                }
                if (isset($_POST['errNotifEmail'])) {
                    $options['errNotifEmail'] = $_POST['errNotifEmail'];
                }
                if (isset($_POST['forceBrokenCron'])) {
                    $options['forceBrokenCron'] = 1;
                } else {
                    $options['forceBrokenCron'] = 0;
                }
                if (isset($_POST['nxsURLShrtnr'])) {
                    $options['nxsURLShrtnr'] = $_POST['nxsURLShrtnr'];
                }
                if (isset($_POST['bitlyUname'])) {
                    $options['bitlyUname'] = $_POST['bitlyUname'];
                }
                if (isset($_POST['bitlyAPIKey'])) {
                    $options['bitlyAPIKey'] = $_POST['bitlyAPIKey'];
                }
                if (isset($_POST['adflyUname'])) {
                    $options['adflyUname'] = $_POST['adflyUname'];
                }
                if (isset($_POST['adflyAPIKey'])) {
                    $options['adflyAPIKey'] = $_POST['adflyAPIKey'];
                }
                if (isset($_POST['adflyDomain'])) {
                    $options['adflyDomain'] = $_POST['adflyDomain'];
                }
                if (isset($_POST['YOURLSKey'])) {
                    $options['YOURLSKey'] = $_POST['YOURLSKey'];
                }
                if (isset($_POST['YOURLSURL'])) {
                    $options['YOURLSURL'] = $_POST['YOURLSURL'];
                }
                if (isset($_POST['xcoAPIKey'])) {
                    $options['xcoAPIKey'] = $_POST['xcoAPIKey'];
                }
                if (isset($_POST['clkimAPIKey'])) {
                    $options['clkimAPIKey'] = $_POST['clkimAPIKey'];
                }
                if (isset($_POST['postAPIKey'])) {
                    $options['postAPIKey'] = $_POST['postAPIKey'];
                }
                if (isset($_POST['gglAPIKey'])) {
                    $options['gglAPIKey'] = $_POST['gglAPIKey'];
                }
                if ($options['nxsURLShrtnr'] == 'B' && (trim($_POST['bitlyAPIKey']) == '' || trim($_POST['bitlyAPIKey']) == '')) {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'Y' && (trim($_POST['YOURLSKey']) == '' || trim($_POST['YOURLSURL']) == '')) {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'A' && (trim($_POST['adflyAPIKey']) == '' || trim($_POST['adflyAPIKey']) == '')) {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'C' && trim($_POST['clkimAPIKey']) == '') {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'P' && trim($_POST['postAPIKey']) == '') {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'X' && trim($_POST['xcoAPIKey']) == '') {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if (isset($_POST['forceSURL'])) {
                    $options['forceSURL'] = 1;
                } else {
                    $options['forceSURL'] = 0;
                }
                if (isset($_POST['brokenCntFilters'])) {
                    $options['brokenCntFilters'] = 1;
                } else {
                    $options['brokenCntFilters'] = 0;
                }
                if (isset($_POST['nsOpenGraph'])) {
                    $options['nsOpenGraph'] = $_POST['nsOpenGraph'];
                } else {
                    $options['nsOpenGraph'] = 0;
                }
                if (isset($_POST['imgNoCheck'])) {
                    $options['imgNoCheck'] = 0;
                } else {
                    $options['imgNoCheck'] = 1;
                }
                if (isset($_POST['useForPages'])) {
                    $options['useForPages'] = 1;
                } else {
                    $options['useForPages'] = 0;
                }
                if (isset($_POST['showPrxTab'])) {
                    $options['showPrxTab'] = 1;
                } else {
                    $options['showPrxTab'] = 0;
                }
                if (isset($_POST['useRndProxy'])) {
                    $options['useRndProxy'] = 1;
                } else {
                    $options['useRndProxy'] = 0;
                }
                if (isset($_POST['prxList'])) {
                    $options['prxList'] = $_POST['prxList'];
                }
                if (isset($_POST['addURLParams'])) {
                    $options['addURLParams'] = $_POST['addURLParams'];
                }
                if (isset($_POST['riActive'])) {
                    $options['riActive'] = 1;
                } else {
                    $options['riActive'] = 0;
                }
                if (isset($_POST['riHowManyPostsToTrack'])) {
                    $options['riHowManyPostsToTrack'] = $_POST['riHowManyPostsToTrack'];
                }
                if (isset($_POST['useUnProc'])) {
                    $options['useUnProc'] = $_POST['useUnProc'];
                } else {
                    $options['useUnProc'] = 0;
                }
                if (!empty($_POST['nxsCPTSeld']) && is_array($_POST['nxsCPTSeld'])) {
                    $cpTypes = $_POST['nxsCPTSeld'];
                } else {
                    $cpTypes = array();
                }
                $options['nxsCPTSeld'] = serialize($cpTypes);
                if (isset($_POST['post_category'])) {
                    $pk = $_POST['post_category'];
                    if (!is_array($pk)) {
                        $pk = urldecode($pk);
                        parse_str($pk);
                    }
                    remove_action('get_terms', 'order_category_by_id', 10);
                    $cIds = get_terms('category', array('fields' => 'ids', 'get' => 'all'));
                    if (is_array($pk) && $cIds) {
                        $options['exclCats'] = serialize(array_diff($cIds, $pk));
                    } else {
                        $options['exclCats'] = '';
                    }
                }
                //prr($options['exclCats']);
                if (!isset($_POST['whoCanSeeSNAPBox'])) {
                    $_POST['whoCanSeeSNAPBox'] = array();
                }
                $_POST['whoCanSeeSNAPBox'][] = 'administrator';
                if (isset($_POST['whoCanSeeSNAPBox'])) {
                    $options['whoCanSeeSNAPBox'] = $_POST['whoCanSeeSNAPBox'];
                }
                if (!isset($_POST['whoCanMakePosts'])) {
                    $_POST['whoCanMakePosts'] = array();
                }
                $_POST['whoCanMakePosts'][] = 'administrator';
                if (isset($_POST['whoCanMakePosts'])) {
                    $options['whoCanMakePosts'] = $_POST['whoCanMakePosts'];
                }
                if (isset($_POST['skipSecurity'])) {
                    $options['skipSecurity'] = 1;
                } else {
                    $options['skipSecurity'] = 0;
                }
                if (isset($_POST['quLimit'])) {
                    $options['quLimit'] = 1;
                } else {
                    $options['quLimit'] = 0;
                }
                //## Query has been activated
                $isTimeChanged = isset($_POST['quDays']) && isset($options['quDays']) && $_POST['quDays'] != $options['quDays'] || !isset($options['quDays']) || (isset($_POST['quHrs']) && isset($options['quHrs']) && $_POST['quHrs'] != $options['quHrs'] || !isset($options['quHrs'])) || (isset($_POST['quMins']) && isset($options['quMins']) && $_POST['quMins'] != $options['quMins'] || !isset($options['quMins']));
                if (isset($_POST['nxsOverLimit'])) {
                    $options['nxsOverLimit'] = $_POST['nxsOverLimit'];
                }
                if (isset($_POST['quLimitRndMins'])) {
                    $options['quLimitRndMins'] = $_POST['quLimitRndMins'];
                }
                if (isset($_POST['quDays'])) {
                    $options['quDays'] = $_POST['quDays'];
                }
                if (isset($_POST['quHrs'])) {
                    $options['quHrs'] = $_POST['quHrs'];
                }
                if (isset($_POST['quMins'])) {
                    $options['quMins'] = $_POST['quMins'];
                }
                if ($isTimeChanged) {
                    $currTime = time() + get_option('gmt_offset') * HOUR_IN_SECONDS;
                    $pstEvrySec = $options['quDays'] * 86400 + $options['quHrs'] * 3600 + $options['quMins'] * 60;
                    $options['quNxTime'] = $currTime + $pstEvrySec;
                }
                if (isset($_POST['rpstActive'])) {
                    $options['rpstActive'] = 1;
                } else {
                    $options['rpstActive'] = 0;
                }
                if ($nxs_isWPMU && (!isset($options['suaMode']) || $options['suaMode'] == '')) {
                    $options['suaMode'] = $nxs_tpWMPU;
                }
                $editable_roles = get_editable_roles();
                foreach ($editable_roles as $roleX => $details) {
                    $role = get_role($roleX);
                    $role->remove_cap('see_snap_box');
                    $role->remove_cap('make_snap_posts');
                }
                foreach ($options['whoCanSeeSNAPBox'] as $uRole) {
                    $role = get_role($uRole);
                    $role->add_cap('see_snap_box');
                    $role->add_cap('make_snap_posts');
                }
                foreach ($options['whoCanMakePosts'] as $uRole) {
                    $role = get_role($uRole);
                    $role->add_cap('make_snap_posts');
                }
                update_option($this->dbOptionsName, $options);
                $this->nxs_options = $options;
                ?>
<div class="updated"><p><strong><?php 
                _e("Settings Updated.", 'social-networks-auto-poster-facebook-twitter-g');
                ?>
</strong></p></div><?php 
            }
            $isNoNts = true;
            foreach ($nxs_snapAvNts as $avNt) {
                if (isset($options[$avNt['lcode']]) && is_array($options[$avNt['lcode']]) && count($options[$avNt['lcode']]) > 0) {
                    $isNoNts = false;
                    break;
                }
            }
            remove_action('get_terms', 'order_category_by_id', 10);
            $category_ids = get_terms('category', array('fields' => 'ids', 'get' => 'all'));
            if (isset($options['exclCats'])) {
                $pk = maybe_unserialize($options['exclCats']);
            } else {
                $pk = '';
            }
            if (is_array($category_ids) && is_array($pk) && count($category_ids) == count($pk)) {
                ?>
  <div class="error" id="message"><p><strong>All your categories are excluded from auto-posting.</strong> Nothing will be auto-posted. Please Click "Settings Tab" and select some categories.</div>
<?php 
            }
            if (!$nxs_isWPMU) {
                $this->NS_SNAP_ShowPageTop();
            }
            ?>
            Please see the <a target="_blank" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress">detailed installation/configuration instructions</a> (will open in a new tab)<br/>
            <?php 
            if (!isset($options['hideTopTip']) || (int) $options['hideTopTip'] != 1) {
                /* ?>
                   <div id="nxs_TopTip" class="nxsInfoMsg" style="font-size: 11px; margin-left: 3px; max-width: 1100px; display: block; font-style: italic; margin-bottom: 5px;">Tip: If autoposting works when you click "Test" buttons, but is not working when you publish new posts, try to switch from "Scheduled" to "Immediately" in the Plugin Settings->Other Settings->How to make auto-posts. 
                     <span style="float: right;"><a style="text-decoration: none" href="#" onclick="nxs_hideTip('nxs_TopTip'); return false;">[Hide]</a></span>
                   </div>                       
                   <?php */
            } else {
                ?>
<br/><?php 
            }
            ?>
            
                  <?php 
            ?>
           
<ul class="nsx_tabs">
    <li><a href="#nsx_tab1">Your Social Networks Accounts</a></li>
    <li><a href="#nsx_tab2"><?php 
            _e('Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</a></li>
    <?php 
            if (function_exists("nxs_showPRXTab") && (int) $options['showPrxTab'] == 1) {
                ?>
 <li><a href="#nsx_tab5">Proxies</a></li> <?php 
            }
            ?>
    <li><a href="#nsx_tab3">Log/History</a></li>
    <li><a href="#nsx_tab4">Help/Support</a></li>
    <li><a class="ab-item" href="#nsx_tab5"><span style="font-weight:bold; font-size: 16px; color:#2ecc2e;">&rArr;</span> New Post to Social Networks</a></li>    
    
</ul>

<div class="nsx_tab_container">

    <div id="nsx_tab1" class="nsx_tab_content">
    <form method="post" id="nsStForm" action=""> <input style="display:none" type="text" name="nxs_fk_UserName" id="nxs_FakeUserNameToBePreFilledByChrome"/>
    <input style="display:none" name="nxs_fk_password" type="password" id="nxs_FakePasswordToBePreFilledByChrome"/>
    <a href="#" class="NXSButton" id="nxs_snapAddNew">Add new account</a> <div class="nxsInfoMsg"><img style="position: relative; top: 8px;" alt="Arrow" src="<?php 
            echo $nxs_plurl;
            ?>
img/arrow_l_green_c1.png"/> You can add Facebook, Twitter, Google+, Pinterest, LinkedIn, Tumblr, Blogger/Blogspot, Delicious, etc accounts</div><br/><br/>
          <div id="nxs_spPopup"><span class="nxspButton bClose"><span>X</span></span>Add New Network: <select onchange="doShowFillBlockX(this.value);" id="nxs_ntType"><option value =""></option>
           <?php 
            foreach ($nxs_snapAvNts as $avNt) {
                if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']]) == 0) {
                    $mt = 0;
                } else {
                    $mt = 1 + max(array_keys($options[$avNt['lcode']]));
                }
                echo '<option value ="' . $avNt['code'] . $mt . '">' . $avNt['name'] . '</option>';
            }
            ?>
           </select>           
           <div id="nsx_addNT">
             <?php 
            foreach ($nxs_snapAvNts as $avNt) {
                $clName = 'nxs_snapClass' . $avNt['code'];
                $ntClInst = new $clName();
                if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']]) == 0) {
                    $ntClInst->showNewNTSettings(0);
                } else {
                    $mt = 1 + max(array_keys($options[$avNt['lcode']]));
                    if (function_exists('getNSXOption') && function_exists('nxs_doSMAS1')) {
                        nxs_doSMAS1($ntClInst, $mt);
                    } else {
                        nxs_doSMAS($avNt['name'], $avNt['code'] . $mt);
                    }
                }
            }
            ?>
           
           </div>
           
           </div>
           
           <div class="popShAtt" id="popOnlyCat"><?php 
            _e('Filters are "ON". Only selected categories/tags will be autoposted to this account. Click "Show Settings->Advanced" to change', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</div>
           <div class="popShAtt" id="popReActive"><?php 
            _e('Reposter is activated for this account', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</div>
           
           <div id="showCatSel" style="display: none;background-color: #fff; width: 300px; padding: 25px;"><span class="nxspButton bClose"><span>X</span></span><?php 
            _e('Select Categories', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
: 
                    <div id="fbSelCatsGLB" class="categorydivInd" style="padding-left: 15px; background-color: #fff;"> 
       <a href="#" onclick="nxs_chAllCatsL(1, 'fbSelCatsGLB'); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCatsL(0, 'fbSelCatsGLB'); return false;">UnCheck all</a>
          <div id="category-all" class="tabs-panel"> <input type="hidden" id="tmpCatSelNT" name="tmpCatSelNT" value="" />
          <?php 
            $num_cats = wp_count_terms('category');
            if ($num_cats > 1000) {
                echo "Sorry, You have too many categories - (" . $num_cats . ') to show the list. Please use "Tags and Custom Taxonomies" field with category|category_slug format';
            } else {
                ?>
            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
                <?php 
                $args = array('descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => 'category', 'checked_ontop' => false);
                if (function_exists('wp_terms_checklist')) {
                    wp_terms_checklist(0, $args);
                }
                /* //## Show Hierarcical custom taxonomies as categories.
                   $args = array('hierarchical' => true, 'public'   => true, '_builtin' => false );  $output = 'names';  $operator = 'and'; $taxonomies = get_taxonomies( $args, $output, $operator ); 
                   if ( $taxonomies ) foreach ( $taxonomies  as $taxonomy ) { ?> <b><br/>&nbsp;&nbsp;<?php _e($taxonomy, 'social-networks-auto-poster-facebook-twitter-g'); ?></b><br/> <?php
                     $args = array( 'descendants_and_self' => 0, 'selected_cats' => '', 'taxonomy' => $taxonomy, 'checked_ontop' => false); if (function_exists('wp_terms_checklist')) wp_terms_checklist(0, $args );     
                   } 
                   */
                ?>
            </ul> <?php 
            }
            ?>
          </div>  
       </div>    <div class="submitX"><input type="button" id="" class="button-primary" name="btnSelCats" onclick="nxs_doSetSelCats( jQuery('#tmpCatSelNT').val() ); jQuery('#showCatSel').bPopup().close();" value="Select Categories" /></div>
           </div>
            <?php 
            foreach ($nxs_snapAvNts as $avNt) {
                $clName = 'nxs_snapClass' . $avNt['code'];
                $ntClInst = new $clName();
                if (isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']]) > 0) {
                    $ntClInst->showGenNTSettings($options[$avNt['lcode']]);
                }
                // else $ntClInst->showNewNTSettings(0);
            }
            if ($isNoNts) {
                ?>
<br/><br/><br/>You don't have any configured social networks yet. Please click "Add new account" button.<br/><br/>
           <input onclick="jQuery('#impFileSettings_button').click(); return false;" type="button" class="button" name="impSettings_repostButton" id="impSettings_button"  value="<?php 
                _e('Import Settings', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
" />     
         <?php 
            } else {
                ?>
   
             
           <div style="float: right; padding: 1.5em;">
           
            <input onclick="nxs_expSettings(); return false;" type="button" class="button" name="expSettings_repostButton" id="expSettings_button"  value="<?php 
                _e('Export Settings', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
" />
            <input onclick="jQuery('#impFileSettings_button').click(); return false;" type="button" class="button" name="impSettings_repostButton" id="impSettings_button"  value="<?php 
                _e('Import Settings', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
" />            
           </div>
           <input value="'" type="hidden" name="nxs_mqTest" /> 
           <div class="submitX"><input type="submit" id="nxs-button-primary-submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
                _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
" /></div>
           
           <?php 
            }
            ?>
   
    </form>          
    </div> <!-- END TAB -->
    
    <div id="nsx_tab2" class="nsx_tab_content">  <script type="text/javascript">setTimeout( function(){ document.getElementById( "nsStFormMisc" ).reset();},5);</script>
    <form method="post" id="nsStFormMisc" action="<?php 
            echo $nxs_snapThisPageUrl;
            ?>
">    <input type="hidden" name="nxsMainFromElementAccts" id="nxsMainFromElementAccts" value="" />
    
    
    
       <input type="hidden" name="_wpnonce" id="_wpnonce" value="" /> <input type="hidden" name="nxsMainFromSupportFld" id="nxsMainFromSupportFld" value="1" />
     <!-- ##################### OTHER #####################-->            

     <!-- How to make auto-posts? --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('How to make auto-posts?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 &lt;-- (<a id="showShAttIS" onmouseover="showPopShAtt('IS', event);" onmouseout="hidePopShAtt('IS');"  onclick="return false;" class="underdash" href="#"><?php 
            _e('What\'s the difference?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</a>)</h3></div>
         <div class="popShAtt" id="popShAttIS">
        <h3><?php 
            _e('The difference between "Immediately" and "Scheduled"', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3>
        <?php 
            _e('<b>"Immediately"</b> - Once you click "Publish" button plugin starts pushing your update to configured social networks. At this time you need to wait and look at the turning circle. Some APIs are pretty slow, so you have to wait and wait and wait until all updates are posted and page released back to you.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
<br/><br/>
        <?php 
            _e('<b>"Scheduled"</b> - Releases the page immediately back to you, so you can proceed with something else and it schedules all auto-posting jobs to your WP-Cron. This is much faster and much more efficient, but it could not work if your WP-Cron is disabled or broken.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
      </div>
             <div class="nxs_box_inside"> 
             
              <div class="itemDiv">
               <input type="radio" name="nxsHTDP" value="I" <?php 
            if (isset($options['nxsHTDP']) && $options['nxsHTDP'] == 'I') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Publish Immediately', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>  - <i><?php 
            _e('No WP Cron will be used. Choose if WP Cron is disabled or broken on your website', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</i><br/>
              </div>  
              
              <div class="itemDiv">
              <input type="radio" name="nxsHTDP" value="S" <?php 
            if (!isset($options['nxsHTDP']) || $options['nxsHTDP'] == 'S') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Use WP Cron to Schedule autoposts', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> - <i><?php 
            _e('Recommended for most sites. Faster Performance - requires working WP Cron', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</i><br/> <?php 
            /* ?>
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="runNXSCron" value="1"> <b><?php _e('Try to process missed "Scheduled" posts.', 'social-networks-auto-poster-facebook-twitter-g') ?></b> <i><?php _e('Usefull when WP Cron is disabled or broken, but can cause some short perfomance issues and duplicates. It is <b>highly</b> recomended to setup a proper cron job of fix WP Cron instead', 'social-networks-auto-poster-facebook-twitter-g') ?></i>. <?php */
            ?>
              </div>         
              
              <div class="itemDiv">
              <div style="margin-left: 20px;">
              
              <?php 
            $cr = get_option('NXS_cronCheck');
            if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status'] == '0') {
                ?>
 <span style="color: red"> *** <?php 
                _e('Your WP Cron is not working correctly. This feature may not work properly, and might cause duplicate postings and stability problems.<br/> Please see the test results and recommendations here:', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
     &nbsp;-&nbsp;<a target="_blank" href="<?php 
                global $nxs_snapThisPageUrl;
                echo $nxs_snapThisPageUrl;
                ?>
&do=crtest">WP Cron Test Results</a></span> <br/>
            <?php 
            }
            ?>
              
              <input type="checkbox" name="quLimit" value="1" <?php 
            if (isset($options['quLimit']) && $options['quLimit'] == '1') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Limit autoposting speed', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> - <i><?php 
            _e('Recommended for busy sites with a lot of new posts.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </i><br/> 
              <div style="margin-left: 10px;">
              Do not autopost more than one post per network every <input name="quDays" style="width: 24px;" value="<?php 
            echo isset($options['quDays']) ? $options['quDays'] : '0';
            ?>
" /> Days,&nbsp;&nbsp;
              <input name="quHrs" style="width: 24px;" value="<?php 
            echo isset($options['quHrs']) ? $options['quHrs'] : '0';
            ?>
" /> Hours,&nbsp;&nbsp;
              <input name="quMins" style="width: 24px;" value="<?php 
            echo isset($options['quMins']) ? $options['quMins'] : '3';
            ?>
" /> Minutes.
                <div style="margin-left: 10px;">
                 <b><?php 
            _e('Randomize posting time &#177;', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </b>
     <input type="text" name="quLimitRndMins" style="width: 35px;" value="<?php 
            echo isset($options['quLimitRndMins']) ? $options['quLimitRndMins'] : '2';
            ?>
" />&nbsp;<?php 
            _e('Minutes', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
                </div>
                 
                 <div style="margin-left: 10px;">
                 <?php 
            _e('What to do with the rest of the posts if there are more posts then daily limit?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
<br/>
                    <input type="radio" name="nxsOverLimit" value="D" <?php 
            if (!isset($options['nxsOverLimit']) || $options['nxsOverLimit'] == 'D') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Skip/Discard/Don\'t Autopost ', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b><br/>
                    <input type="radio" name="nxsOverLimit" value="S" <?php 
            if (isset($options['nxsOverLimit']) && $options['nxsOverLimit'] == 'S') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Schedule for tomorrow', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>  - <i><?php 
            _e('Not recommended, may cause significant delays', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</i><br/>
                 </div>
              </div>
              </div>
              </div>                          
              
              
           </div></div>
     <!-- #### Who can see auto-posting options on the "New Post" pages? ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('User Privileges/Security', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> 
              <div class="itemDiv">
              
             <input value="set" id="skipSecurity" name="skipSecurity"  type="checkbox" <?php 
            if (!empty($options['skipSecurity']) && (int) $options['skipSecurity'] == 1) {
                echo "checked";
            }
            ?>
 />  <b><?php 
            _e('Skip User Security Verification.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>     
             <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('NOT Recommended, but useful in some situations. This will allow autoposting for everyone even for the non-existent users.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span>  
              
              <h4><?php 
            _e('Who can make autoposts without seeing any auto-posting options?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h4>
              
              <?php 
            $editable_roles = get_editable_roles();
            if (!isset($options['whoCanMakePosts']) || !is_array($options['whoCanMakePosts'])) {
                $options['whoCanMakePosts'] = array();
            }
            foreach ($editable_roles as $role => $details) {
                $name = translate_user_role($details['name']);
                echo '<input type="checkbox" ';
                if (in_array($role, $options['whoCanMakePosts']) || $role == 'administrator') {
                    echo ' checked="checked" ';
                }
                if ($role == 'administrator') {
                    echo '  disabled="disabled" ';
                }
                echo 'name="whoCanMakePosts[]" value="' . esc_attr($role) . '"> ' . $name;
                if ($role == 'administrator') {
                    echo ' - Somebody who has access to all the administration features';
                }
                if ($role == 'editor') {
                    echo " - Somebody who can publish and manage posts and pages as well as manage other users' posts, etc. ";
                }
                if ($role == 'author') {
                    echo ' - Somebody who can publish and manage their own posts ';
                }
                if ($role == 'contributor') {
                    echo ' - Somebody who can write and manage their posts but not publish them';
                }
                if ($role == 'subscriber') {
                    echo ' - Somebody who can only manage their profile';
                }
                echo '<br/>';
            }
            ?>
    
     <h4><?php 
            _e('Who can see auto-posting options on the "New Post" and "Edit Post" pages and make autoposts?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h4>
              
              <?php 
            $editable_roles = get_editable_roles();
            if (!isset($options['whoCanSeeSNAPBox']) || !is_array($options['whoCanSeeSNAPBox'])) {
                $options['whoCanSeeSNAPBox'] = array();
            }
            foreach ($editable_roles as $role => $details) {
                $name = translate_user_role($details['name']);
                echo '<input type="checkbox" ';
                if (in_array($role, $options['whoCanSeeSNAPBox']) || $role == 'administrator') {
                    echo ' checked="checked" ';
                }
                if ($role == 'administrator' || $role == 'subscriber') {
                    echo '  disabled="disabled" ';
                }
                echo 'name="whoCanSeeSNAPBox[]" value="' . esc_attr($role) . '"> ' . $name;
                if ($role == 'administrator') {
                    echo ' - Somebody who has access to all the administration features';
                }
                if ($role == 'editor') {
                    echo " - Somebody who can publish and manage posts and pages as well as manage other users' posts, etc. ";
                }
                if ($role == 'author') {
                    echo ' - Somebody who can publish and manage their own posts ';
                }
                if ($role == 'contributor') {
                    echo ' - Somebody who can write and manage their posts but not publish them';
                }
                if ($role == 'subscriber') {
                    echo ' - Somebody who can only manage their profile';
                }
                echo '<br/>';
            }
            ?>
    
    
    
    
              </div>
              
           </div></div>        
     <!-- #### Include/Exclude Wordpress Pages and Custom Post Types ##### --> 
           <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Include/Exclude Wordpress Pages and Custom Post Types', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>                          
             <div class="nxs_box_inside"> 
             <div class="itemDiv"> 
              <input value="set" id="useForPages" name="useForPages"  type="checkbox" <?php 
            if (!empty($options['useForPages']) && (int) $options['useForPages'] == 1) {
                echo "checked";
            }
            ?>
 />  <b><?php 
            _e('Use for Wordpress Pages', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>     
             <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Show the SNAP metabox and auto-post for pages, not just posts.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span>  
             </div>
              <div class="itemDiv"><b><br/><?php 
            _e('Custom Post Types:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>              
              <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Please select "Custom Post Types" that you would like to be autoposted to your social networks', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <?php 
            $nxsOne = base64_encode("v=" . $nxsOne);
            $args = array('public' => true, '_builtin' => false);
            $output = 'names';
            $operator = 'and';
            $post_types = array();
            if (function_exists('get_post_types')) {
                $post_types = get_post_types($args, $output, $operator);
            }
            if (!empty($options['nxsCPTSeld'])) {
                $nxsCPTSeld = unserialize($options['nxsCPTSeld']);
            } else {
                $nxsCPTSeld = array_keys($post_types);
            }
            ?>
 <div class="taxonomydiv"><div class="tabs-panel" style="padding: 10px;"><input type="hidden" name="nxsCPTSeld[]" value="0" /> <?php 
            //prr($nxsCPTSeld); prr($post_types); prr($_POST['nxsCPTSeld']);
            foreach ($post_types as $cptID => $cptName) {
                if (in_array($cptID, $nxsCPTSeld)) {
                    $dCh = ' checked="checked" ';
                } else {
                    $dCh = "";
                }
                ?>
<input type="checkbox" name="nxsCPTSeld[]" value="<?php 
                echo esc_attr($cptID);
                ?>
"<?php 
                echo $dCh;
                ?>
>&nbsp;<?php 
                echo $cptName;
                ?>
<br/> <?php 
            }
            ?>
</div></div>        
              </div>               
           </div></div>            
     <!-- #### Categories to Include/Exclude: ##### --> 
            <script type="text/javascript"> function nxs_chAllCats(ch){ jQuery("form input:checkbox[name='post_category[]']").attr('checked', ch==1);}
     (function($) { $(function() {
       jQuery('.button-primary[name="update_NS_SNAutoPoster_settings"]').bind('click', function(e) { var str = jQuery('input[name="post_category[]"]').serialize(); jQuery('div.categorydivInd').replaceWith('<input type="hidden" name="pcInd" value="" />'); 
         str = str.replace(/post_category/g, "pk"); jQuery('div.categorydiv').replaceWith('<input type="hidden" name="post_category" value="'+str+'" />');  
     }); }); })(jQuery); </script>                 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Categories to Include/Exclude:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Each blogpost will be autoposted to all categories selected below. All categories are selected by default. 
              <b>Uncheck</b> categories that you would like <b>NOT</b> to auto-post by default. Assigning the unchecked category to the new blogpost will turn off auto-posting to all configured networks.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <a href="#" onclick="nxs_chAllCats(1); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCats(0); return false;">UnCheck all</a>

 <div id="taxonomy-category" class="categorydiv">
        <div id="category-all" class="tabs-panel"><input type='hidden' name='post_category[]' value='0' /> 
        <?php 
            $num_cats = wp_count_terms('category');
            if ($num_cats > 1000) {
                echo "Sorry, You have too many categories - " . $num_cats;
            } else {
                ?>
            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
                <?php 
                if (isset($options['exclCats'])) {
                    $pk = maybe_unserialize($options['exclCats']);
                } else {
                    $pk = '';
                }
                if (is_array($pk) && count($pk) > 0) {
                    $selCats = array_diff($category_ids, $pk);
                } else {
                    $selCats = $category_ids;
                }
                $args = array('descendants_and_self' => 0, 'selected_cats' => $selCats, 'taxonomy' => 'category', 'checked_ontop' => false);
                if (function_exists('wp_terms_checklist')) {
                    wp_terms_checklist(0, $args);
                }
                ?>
            </ul> <?php 
            }
            ?>
        </div>  
    </div>
              </div>              
           </div></div>    
     <!-- ##################### URL Shortener #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('URL Shortener', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
            <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;">Please use %SURL% in "Message Format" to get shortened urls or check "Force Shortened Links". </span> <br/>
              <!-- <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="G" <?php 
            if (!isset($options['nxsURLShrtnr']) || $options['nxsURLShrtnr'] == '' || $options['nxsURLShrtnr'] == 'G') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>gd.is</b> (Default) - fast, simple, free, no configuration nessesary.            
              </div> -->
              <div class="itemDiv">
              
     <input type="checkbox" name="forceSURL" value="1" <?php 
            if (isset($options['forceSURL']) && $options['forceSURL'] == '1') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Force Shortened Links', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>
     <br/><br/>         
              <input type="radio" name="nxsURLShrtnr" value="O" <?php 
            if (!isset($options['nxsURLShrtnr']) || isset($options['nxsURLShrtnr']) && ($options['nxsURLShrtnr'] == 'O' || $options['nxsURLShrtnr'] == 'G')) {
                echo 'checked="checked"';
            }
            ?>
 /> <b>goo.gl</b>  - <i> Enter goo.gl <a target="_blank" href="https://developers.google.com/url-shortener/v1/getting_started#APIKey">API Key</a> below [Optional]</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goo.gl&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="gglAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['gglAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['gglAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              
              <?php 
            if (function_exists('wp_get_shortlink')) {
                ?>
<div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="W" <?php 
                if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'W') {
                    echo 'checked="checked"';
                }
                ?>
 /> <b>Wordpress Built-in Shortener</b> (wp.me if you use Jetpack)<br/> 
              </div><?php 
            }
            ?>
              <!-- ## bitly ##-->
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="B" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'B') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>bit.ly</b>  - <i>Enter bit.ly username and <a target="_blank" href="http://bitly.com/a/your_api_key">API Key</a> below</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly Username: <input name="bitlyUname" style="width: 20%;" value="<?php 
            if (isset($options['bitlyUname'])) {
                _e(apply_filters('format_to_edit', $options['bitlyUname']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="bitlyAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['bitlyAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['bitlyAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              
              <!-- ## u.to ##-->
              <div class="itemDiv">
                <input type="radio" name="nxsURLShrtnr" value="U" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'U') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>u.to</b>  <i>Simple and anonymous (no accounts, no stats) use only, No additional configuration required.</i>
              </div>
              
              <!-- ## x.co ##-->
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="X" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'X') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>x.co</b>  - <i>Enter x.co <a target="_blank" href="http://app.x.co/Settings.aspx">API Key</a> below. You can get API key from your x.co settings page: <a target="_blank" href="http://app.x.co/Settings.aspx">http://app.x.co/Settings.aspx</a>.</i><br/>              
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x.co&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="xcoAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['xcoAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['xcoAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              <!-- ## clk.im ##-->
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="C" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'C') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>clk.im</b>  - <i>Enter clk.im <a target="_blank" href="http://clk.im/apikey">API Key</a> below. You can get API key from your clk.im page: <a target="_blank" href="http://clk.im/apikey">http://clk.im/apikey</a>. Please see the "Developers/Publishers" section on the right</i><br/>              
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clk.im&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="clkimAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['clkimAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['clkimAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              <!-- ## po.st ##-->
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="P" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'P') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>po.st</b>  - <i>Enter po.st <a target="_blank" href="https://re.po.st/partner/campaigns">API Key</a> below. You can get API key from your "Campaigns" page: <a target="_blank" href="https://re.po.st/partner/campaigns">https://re.po.st/partner/campaigns</a></i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;po.st&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="postAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['postAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['postAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="A" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'A') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>adf.ly</b>  - <i>Enter adf.ly user ID and <a target="_blank" href="https://adf.ly/publisher/tools#tools-api">API Key</a> below</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly User ID: <input name="adflyUname" style="width: 20%;" value="<?php 
            if (isset($options['bitlyUname'])) {
                _e(apply_filters('format_to_edit', $options['adflyUname']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="adflyAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['adflyAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['adflyAPIKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
             <div style="width:100%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adf.ly Domain: <select name="adflyDomain" id="adflyDomain">
            <?php 
            $adflyDomains = '<option value="adf.ly">adf.ly</option><option value="q.gs">q.gs</option>';
            if (isset($options['adflyDomain']) && $options['adflyDomain'] != '') {
                $adflyDomains = str_replace($options['adflyDomain'] . '"', $options['adflyDomain'] . '" selected="selected"', $adflyDomains);
            }
            echo $adflyDomains;
            ?>
            </select> <i>Please note that j.gs is not availabe for API use.</i> </div>
              </div>
              
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="Y" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'Y') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>YOURLS (Your Own URL Shortener)</b> - 
            &nbsp;<i>YOURLS API URL - usually sonething like http://yourdomain.cc/yourls-api.php; YOURLS API Secret Signature Token can be found in your YOURLS Admin Panel-&gt;Tools</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API URL: <input name="YOURLSURL" style="width: 19.4%;" value="<?php 
            if (isset($options['YOURLSURL'])) {
                _e(apply_filters('format_to_edit', $options['YOURLSURL']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API Secret Signature Token:&nbsp;&nbsp;&nbsp;<input name="YOURLSKey" style="width: 13%;" value="<?php 
            if (isset($options['YOURLSKey'])) {
                _e(apply_filters('format_to_edit', $options['YOURLSKey']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>
              
            </div></div>
            
            <!-- ##################### Auto-Import comments from Social Networks #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Auto-Import comments from Social Networks', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
<span class="nxs_newLabel">[<?php 
            _e('New', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
]</span></h3></div>
             <div class="nxs_box_inside"> 
             
             <?php 
            $cr = get_option('NXS_cronCheck');
            if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status'] == '0') {
                ?>
 <span style="color: red"> *** <?php 
                _e('Your WP Cron is not working correctly. This feature may not work properly, and might cause duplicate postings and stability problems.<br/> Please see the test results and recommendations here:', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
     &nbsp;-&nbsp;<a target="_blank" href="<?php 
                global $nxs_snapThisPageUrl;
                echo $nxs_snapThisPageUrl;
                ?>
&do=crtest">WP Cron Test Results</a></span> <br/>
            <?php 
            }
            ?>
             
             
             <span style="font-size: 11px; margin-left: 1px;">Plugin will automatically grab the comments posted on Social Networks and insert them as "Comments to your post". Plugin will check for the new comments every hour. </span> <br/>
              <div class="itemDiv">
              <input value="set" id="riActive" name="riActive"  type="checkbox" <?php 
            if (!empty($options['riActive']) && (int) $options['riActive'] == 1) {
                echo "checked";
            }
            ?>
 /> 
              <strong>Enable "Comments Import"</strong>
              </div>
              <div class="itemDiv">
             <strong style="font-size: 12px; margin: 10px; margin-left: 1px;">How many posts should be tracked:</strong>
<input name="riHowManyPostsToTrack" style="width: 50px;" value="<?php 
            if (isset($options['riHowManyPostsToTrack'])) {
                _e(apply_filters('format_to_edit', $options['riHowManyPostsToTrack']), 'social-networks-auto-poster-facebook-twitter-g');
            } else {
                echo "10";
            }
            ?>
" /> <br/>
              
             <span style="font-size: 11px; margin-left: 1px;">Setting two many will degrade your website's performance. 10-20 posts are recommended</span> 
              </div>
              
           </div></div>
           
     <!-- ##################### Additional URL Parameters #####################-->   
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Additional URL Parameters', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 <span class="nxs_newLabel">[<?php 
            _e('New', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
]</span></h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Will be added to backlinks.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
                <b><?php 
            _e('Additional URL Parameters:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>  <input name="addURLParams" style="width: 800px;" value="<?php 
            if (isset($options['addURLParams'])) {
                _e(apply_filters('format_to_edit', $options['addURLParams']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>               
             <span style="font-size: 11px; margin-left: 1px;"> <?php 
            _e('You can use %NTNAME% for social network name, %NTCODE% for social network two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  %POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
           </div></div>   
           
           <!-- ##### HashTag Settings ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Auto-HashTags Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('How to generate hashtags if tag is longer then one word', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('Replace spaces in hashtags with ', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <select name="nxsHTSpace" id="nxsHTSpace">
              <option <?php 
            if (empty($options['nxsHTSpace'])) {
                echo "selected";
            }
            ?>
 value="">Nothing</option>
              <option <?php 
            if (!empty($options['nxsHTSpace']) && $options['nxsHTSpace'] == '_') {
                echo "selected";
            }
            ?>
 value ="_">_ (Underscore)</option>
              <option <?php 
            if (!empty($options['nxsHTSpace']) && $options['nxsHTSpace'] == '-') {
                echo "selected";
            }
            ?>
 value ="-">- (Dash)</option>
              </select>
              </div>              
               <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('How to separate hashtags', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('Separate hashtags with ', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <select name="nxsHTSepar" id="nxsHTSepar">
              <option <?php 
            if (!empty($options['nxsHTSepar']) && $options['nxsHTSepar'] == '_') {
                echo "selected";
            }
            ?>
 value ="_">[ ] Space</option>
              <option <?php 
            if (empty($options['nxsHTSepar']) || $options['nxsHTSepar'] == 'c_') {
                echo "selected";
            }
            ?>
 value="c_">[, ] Comma and Space</option>
              <option <?php 
            if (!empty($options['nxsHTSepar']) && $options['nxsHTSepar'] == 'c') {
                echo "selected";
            }
            ?>
 value ="c">[,] Comma</option>              
              </select>
              </div>              
           </div></div>
           
            <!-- ##### ANOUNCE TAG ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('%ANNOUNCE% tag settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how many characters should it get if &lt;!--more--&gt; tag is not found', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('How many characters:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="anounTagLimit" style="width: 100px;" value="<?php 
            if (isset($options['anounTagLimit'])) {
                _e(apply_filters('format_to_edit', $options['anounTagLimit']), 'social-networks-auto-poster-facebook-twitter-g');
            } else {
                echo "300";
            }
            ?>
" />              
              </div>              
           </div></div>  
                           
     <!-- ##################### Open Graph #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('"Open Graph" Tags', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('This is simple and useful implementation of "Open Graph" Tags, as this option will only add tags needed for "Auto Posting". If you use other specialized plugins, uncheck this option.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <input value="1" id="nsOpenGraph" name="nsOpenGraph"  type="checkbox" <?php 
            if (!empty($options['nsOpenGraph']) && (int) $options['nsOpenGraph'] == 1) {
                echo "checked";
            }
            ?>
 /> <b><?php 
            _e('Add Open Graph Tags', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>
              </div>                           
              <div class="itemDiv">
             <b><?php 
            _e('Default Image URL for og:image tag:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> 
            <input name="ogImgDef" style="width: 30%;" value="<?php 
            if (isset($options['ogImgDef'])) {
                _e(apply_filters('format_to_edit', $options['ogImgDef']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              </div>             
           </div></div>    
            <!-- #### "Featured" Image ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Advanced "Featured" Image Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> 
              <div class="itemDiv">
              <input value="set" id="imgNoCheck" name="imgNoCheck"  type="checkbox" <?php 
            /* ## Reversed Intentionally!!! */
            if (empty($options['imgNoCheck']) || (int) $options['imgNoCheck'] != 1) {
                echo "checked";
            }
            ?>
 /> <strong>Verify "Featured" Image</strong>               
              <br/><span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Advanced Setting. Uncheck only if you are 100% sure that your images are valid or if you have troubles with image verification.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              </div>
              
               <div class="itemDiv">
             <input value="1" id="useUnProc" name="useUnProc"  type="checkbox" <?php 
            if (isset($options['useUnProc']) && (int) $options['useUnProc'] == 1) {
                echo "checked";
            }
            ?>
 /> 
             <b><?php 
            _e('Use advanced image finder', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b>
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;"> <?php 
            _e('Check this if your images could be found only in the fully processed posts. <br/>This feature could interfere with some plugins using post processing functions incorrectly. Your site could become messed up, have troubles displaying content or start giving you "ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers" errors.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
              </div>  
              
           </div></div>        
    
      <!-- ##### Alternative "Featured Image" location ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Alternative "Featured Image" location', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Plugin uses standard Wordpress "Featured Image" by default. If your theme stores "Featured Image" in the custom field, please enter the name of it. Use prefix if your custom field has only partial location.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('Custom field name:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="featImgLoc" style="width: 200px;" value="<?php 
            if (isset($options['featImgLoc'])) {
                _e(apply_filters('format_to_edit', $options['featImgLoc']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Set the name of the custom field that contains image info', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
              </div>
              <div class="itemDiv">
             <b><?php 
            _e('Custom field Array Path:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="featImgLocArrPath" style="width: 200px;" value="<?php 
            if (isset($options['featImgLocArrPath'])) {
                _e(apply_filters('format_to_edit', $options['featImgLocArrPath']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /> 
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;">[<?php 
            _e('Optional', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
] <?php 
            _e('If your custom field contain an array, please enter the path to the image field. For example: [\'images\'][\'image\']', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
              </div>
              <div class="itemDiv">
             <b><?php 
            _e('Custom field Image Prefix:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="featImgLocPrefix" style="width: 200px;" value="<?php 
            if (isset($options['featImgLocPrefix'])) {
                _e(apply_filters('format_to_edit', $options['featImgLocPrefix']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /> 
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;">[<?php 
            _e('Optional', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
] <?php 
            _e('If your custom field contain only the last part of the image path, please enter the prefix', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
              </div>
              
              <div class="itemDiv">
             <b><?php 
            _e('Custom field Image text to remove:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="featImgLocRemTxt" style="width: 200px;" value="<?php 
            if (isset($options['featImgLocRemTxt'])) {
                _e(apply_filters('format_to_edit', $options['featImgLocRemTxt']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" /> 
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;">[<?php 
            _e('Optional', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
] <?php 
            _e('If your custom field contain the last part of the image path that need to be removed, please enter it here', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span> 
              </div>
              
           </div></div>    
           
            <!-- ##### Ext Debug/Report Settings ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Debug/Report Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Debug/Report Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
 
             <div class="itemDiv">
              <input value="1" id="brokenCntFilters" name="brokenCntFilters"  type="checkbox" <?php 
            if (isset($options['brokenCntFilters']) && (int) $options['brokenCntFilters'] == 1) {
                echo "checked";
            }
            ?>
 /> 
              <strong>My Content Filters (<i>apply_filters('the_content'</i>) are broken, don't use them</strong>
               - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Some third party plugin break content filters. Check this if some networks do not post silently(without any errors in the log). This will make %EXCERPT% work as %RAWEXCERPT%, %FULLTEXT% as %RAWTEXT%, etc... ', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span>               
              <br/>                             
              </div> 
 
             <div class="itemDiv">
             <b><?php 
            _e('How many log records show?', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="numLogRows" style="width: 200px;" value="<?php 
            if (isset($options['numLogRows'])) {
                _e(apply_filters('format_to_edit', $options['numLogRows']), 'social-networks-auto-poster-facebook-twitter-g');
            } else {
                echo "250";
            }
            ?>
" /> 
              </div>
              <div class="itemDiv"><input value="1" name="dbg[cron]"  type="checkbox" <?php 
            if (isset($options['dbg']['cron']) && (int) $options['dbg']['cron'] == 1) {
                echo "checked";
            }
            ?>
 /> <?php 
            _e('Log Cron Events', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('All WP Cron requests will be logged. Please check this if you have any issues with scheduling, delayed postings, reposter, etc..', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span></div>
              
              <div class="itemDiv">
               <strong>Log/History Info Level</strong><select name="extDebug" id="extDebug">
                <option <?php 
            if (!empty($options['extDebug']) && $options['extDebug'] == '2') {
                echo "selected";
            }
            ?>
 value ="2">Minimal</option>
                <option <?php 
            if (empty($options['extDebug'])) {
                echo "selected";
            }
            ?>
 value="0">Normal</option>              
                <option <?php 
            if (!empty($options['extDebug']) && $options['extDebug'] == '1') {
                echo "selected";
            }
            ?>
 value ="1">Extended/Debug</option>
              </select> <br/>
              
              <?php 
            _e('Minimal', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Only important action info will be added to the log. "Debug", "Skipped", informational info will be ignored.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <?php 
            _e('Normal', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('All info except extended debug queryies will be added to the log.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              <?php 
            _e('Extended/Debug', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Advanced Setting. Extended debug Info will be added to the log.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              </div>
              
              <div class="itemDiv">
              <input value="set" id="errNotifEmailCB" name="errNotifEmailCB"  type="checkbox" <?php 
            if (isset($options['errNotifEmailCB']) && (int) $options['errNotifEmailCB'] == 1) {
                echo "checked";
            }
            ?>
 /> 
              <strong>Send Email notification for errors</strong>
               - <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Send Email notification for all autoposting errors. No more then one email per hour will be sent.', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</span>               
              <br/>               
              <div style="margin-left: 18px;">
              <b><?php 
            _e('Email:', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</b> <input name="errNotifEmail" style="width: 200px;" value="<?php 
            if (isset($options['errNotifEmail'])) {
                _e(apply_filters('format_to_edit', $options['errNotifEmail']), 'social-networks-auto-poster-facebook-twitter-g');
            }
            ?>
" />
              <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('wp_mail will be used. Some email providers (gmail, hotmail) might have problems getting such mail', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
 </span> <br/>
              </div>
              </div>
              
              <?php 
            $cr = get_option('NXS_cronCheck');
            if (!empty($cr) && is_array($cr) && isset($cr['status']) && $cr['status'] == '0') {
                ?>
 
                <div class="itemDiv">             
             <span style="color: red"> *** <?php 
                _e('Your WP Cron is not working correctly.', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
     &nbsp;-&nbsp;<a target="_blank" href="<?php 
                global $nxs_snapThisPageUrl;
                echo $nxs_snapThisPageUrl;
                ?>
&do=crtest">WP Cron Test Results</a></span> <br/>
             
              <input value="set" id="forceBrokenCron" name="forceBrokenCron"  type="checkbox" <?php 
                if (isset($options['forceBrokenCron']) && (int) $options['forceBrokenCron'] == 1) {
                    echo "checked";
                }
                ?>
 /> 
              <strong>Enable Cron functions even if WP Cron is not working correctly.</strong>
               <br/><span style="color:red; font-weight: bold;"><?php 
                _e('I understand that this could cause duplicate postings as well as perfomance and stability problems.', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
</span> - 
               <span style="margin-left: 1px; color:red;"><?php 
                _e('Please do not check this unless you absolutely sure that you know what are you doing.', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
</span>
               <br/><span style="margin-left: 1px; color:#005800;"><?php 
                _e('Setting up WP Cron correctly will be much better solution:', 'social-networks-auto-poster-facebook-twitter-g');
                ?>
                 <a href="http://www.nextscripts.com/tutorials/wp-cron-scheduling-tasks-in-wordpress/" target="_blank">WP-Cron: Scheduling Tasks in WordPress</a>
               </span>
               
               
               
               </div>              
             <?php 
            }
            ?>
 
              
           </div></div>               
    
           
     
     <?php 
            if (function_exists("nxs_showPRXTab")) {
                ?>
          
      <h3 style="font-size: 14px; margin-bottom: 2px;">Show "Proxies" Tab</h3>             
        <p style="margin: 0px;margin-left: 5px;"><input value="set" id="showPrxTab" name="showPrxTab"  type="checkbox" <?php 
                if ((int) $options['showPrxTab'] == 1) {
                    echo "checked";
                }
                ?>
 /> 
          <strong>Show "Proxies" Tab</strong> <span style="font-size: 11px; margin-left: 1px;">Advanced Setting. Check to enable "Proxies" tab where you can setup autoposting proxies.</span>            
        </p>    
      <?php 
            }
            ?>
       
           
      <div class="submitX"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
" /></div>           
      </form>
    </div>
    
    <?php 
            if (function_exists("nxs_showPRXTab") && (int) $options['showPrxTab'] == 1) {
                nxs_showPRXTab($options);
            }
            ?>
    <div id="nsx_tab3" class="nsx_tab_content"> 
    <div style="width:760px;">
    <a href="#" style="float: right" onclick="nxs_rfLog();return false;" class="NXSButton" id="nxs_clearLog">Refresh</a>
    
    Showing last 150 records <a href="#" onclick="nxs_clLog();return false;" class="NXSButton" id="nxs_clearLog">Clear Log</a><br/><br/>    
      <div style="overflow: auto; border: 1px solid #999; width: 920px; height: 600px; font-size: 11px;" class="logDiv" id="nxslogDiv">
        <?php 
            //$logInfo = maybe_unserialize(get_option('NS_SNAutoPosterLog'));
            $logInfo = nxs_getnxsLog();
            if (is_array($logInfo)) {
                foreach (array_reverse($logInfo) as $logline) {
                    if ($logline['type'] == 'E') {
                        $actSt = "color:#FF0000;";
                    } elseif ($logline['type'] == 'M') {
                        $actSt = "color:#585858;";
                    } elseif ($logline['type'] == 'BG') {
                        $actSt = "color:#008000; font-weight:bold;";
                    } elseif ($logline['type'] == 'I') {
                        $actSt = "color:#0000FF;";
                    } elseif ($logline['type'] == 'W') {
                        $actSt = "color:#DB7224;";
                    } elseif ($logline['type'] == 'BI') {
                        $actSt = "color:#0000FF; font-weight:bold;";
                    } elseif ($logline['type'] == 'GR') {
                        $actSt = "color:#008080;";
                    } elseif ($logline['type'] == 'S') {
                        $actSt = "color:#005800; font-weight:bold;";
                    } else {
                        $actSt = "color:#585858;";
                    }
                    if ($logline['type'] == 'E') {
                        $msgSt = "color:#FF0000;";
                    } elseif ($logline['type'] == 'BG') {
                        $msgSt = "color:#008000; font-weight:bold;";
                    } else {
                        $msgSt = "color:#585858;";
                    }
                    if ($logline['nt'] != '') {
                        $ntInfo = ' [' . $logline['nt'] . '] ';
                    } else {
                        $ntInfo = '';
                    }
                    echo '<snap style="color:#008000">[' . $logline['date'] . ']</snap> - <snap style="' . $actSt . '">[' . $logline['act'] . ']</snap>' . $ntInfo . '-  <snap style="' . $msgSt . '">' . $logline['msg'] . '</snap> ' . $logline['extInfo'] . '<br/>';
                }
            }
            ?>
      </div>        
      <?php 
            $quPosts = maybe_unserialize(get_option('NSX_PostsQuery'));
            if (!is_array($quPosts)) {
                $quPosts = array();
            }
            if (count($quPosts) > 0) {
                ?>
      <br/>Query:<br/>
      <div style="overflow: auto; border: 1px solid #999; width: 920px; height: 200px; font-size: 11px;" class="logDiv" id="nxsQUDiv">
      <?php 
                $pstEvrySec = $options['quDays'] * 86400 + $options['quHrs'] * 3600 + $options['quMins'] * 60;
                $offSet = get_option('gmt_offset') * HOUR_IN_SECONDS;
                $currTime = time() + $offSet;
                if (count($quPosts) > 0) {
                    $nxTime = isset($options['quNxTime']) && (int) $options['quNxTime'] > 0 ? $options['quNxTime'] : $currTime + $pstEvrySec;
                    echo "<snap style='color:#008000;'>Current Time:</snap> " . date_i18n('Y-m-d H:i', $currTime) . " | <snap style='color:#000080;'>Next Shedulled Time:</snap> ~" . date_i18n('Y-m-d H:i', $nxTime) . "  |  <snap style='color:#580058;'>Last Post made from query:</snap> " . date_i18n('Y-m-d H:i', $options['quLastShTime']) . "<br/>----====== Query:<br/>";
                    foreach ($quPosts as $spostID) {
                        $pst = get_post($spostID);
                        echo $spostID . " - " . $pst->post_title . "<br/>";
                    }
                }
                ?>
      </div>
      <?php 
            }
            ?>
      
    </div>        
    </div>
    
    <div id="nsx_tab4" class="nsx_tab_content"> 
     
     <div style="max-width:1000px;"> 
     
<h3> Setup/Installation/Configuration Instructions   </h3>

<?php 
            nxs_memCheck();
            ?>
<br/>

     <table style="max-width:1000px"><tr><td valign="top" width="250">
     
   <div style="margin:0 25px 0 0; line-height: 24px;">   

<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/application_form.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress/">Plugin Setup/Installation</a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/facebook.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-facebook-social-networks-auto-poster-wordpress/">  Facebook </a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/twitter.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/">  Twitter </a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/googleplus.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/"> Google+ </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/pinterest.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/">  Pinterest</a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/tumblr.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/">  Tumblr </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/linkedin.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/">  LinkedIn </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/blogger.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/">  Blogger </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/delicious.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/"> Delicious </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/blogcom.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/"> Wordpress.com/Blog.com</a>
<br/><br/>
<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/faq">FAQ</a><br/>
<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a>

</div>

</td>
<td  valign="top" style="font-size: 14px;">
<h3 style="margin-top: 0px;">Have questions/suggestions?</h3>
<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/contact-us">===&gt; Contact us &lt;===</a> <br/>
<h3 style="margin-top: 20px;">Have troubles/problems/found a bug?</h3>
<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/support">===&gt; Open support ticket &lt;===</a>


<h3 style="margin-top: 30px;">Like the Plugin? Would you like to support developers?</h3>
<div style="line-height: 24px;">
<b>Here is what you can do:</b><br/>
<?php 
            if (function_exists('doPostToGooglePlus')) {
                ?>
<s><?php 
            }
            ?>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> Get the <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts/#getit">"Pro" Edition</a>. You will be able to add several accounts for each network as well as post to Google+, Pinterest and LinkedIn company pages.<?php 
            if (function_exists('doPostToGooglePlus')) {
                ?>
</s> <i>Done! Thank you!</i><?php 
            }
            ?>
<br/>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> Rate the plugin 5 stars at <a href="http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/">wordpress.org page</a>.<br/>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> <a href="<?php 
            echo nxs_get_admin_url();
            ?>
post-new.php">Write a blogpost</a> about the plugin and don't forget to auto-post this blogpost to all your social networks ;-).<br/>
</div>
</td></tr></table>
   
   <br/><br/>
   <h3>Solutions for the most common problems: <a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a> </h3>
   
   
  </div> </div> 
  
  <div id="nsx_tab5" class="nsx_tab_content"><?php 
            nxs_showNewPostForm($options);
            ?>
  </div>
</div>     
            <div class="popShAtt" id="popShAttRPST1"><div class="nxs_tls_sbInfo2"><?php 
            _e('Set random delays around your interval time, to make your posts appear more human', 'social-networks-auto-poster-facebook-twitter-g');
            ?>
</div></div>
           <form method="post" enctype="multipart/form-data"  id="nsStFormUpl" action="<?php 
            echo $nxs_snapThisPageUrl;
            ?>
">
              <input type="file" accept="text/plain" onchange="jQuery('#nsStFormUpl').submit();" id="impFileSettings_button" name="impFileSettings_button" style="display: block; visibility: hidden; width: 1px; height: 0;" size="chars">
              <input type="hidden" value="1" name="upload_NS_SNAutoPoster_settings" /> <input value="'" type="hidden" name="nxs_mqTest" />  <?php 
            wp_nonce_field('nxsChkUpl', 'nxsChkUpl_wpnonce');
            ?>
 
           </form>
           <br/>&nbsp;<br/> <?php 
        }
Exemplo n.º 3
0
        function showSNAutoPosterOptionsPage()
        {
            global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_tpWMPU;
            $nxsOne = '';
            $options = $this->nxs_options;
            //prr($options);
            //if($acid==1) $options = $this->nxs_options;  else { switch_to_blog($acid); $options = $this->getAPOptions(); }
            if (isset($_POST['upload_NS_SNAutoPoster_settings'])) {
                if (get_magic_quotes_gpc() || $_POST['nxs_mqTest'] == "\\'") {
                    array_walk_recursive($_POST, 'nsx_stripSlashes');
                }
                array_walk_recursive($_POST, 'nsx_fixSlashes');
                //## Import Settings
                $secCheck = wp_verify_nonce($_POST['nxsChkUpl_wpnonce'], 'nxsChkUpl');
                if ($secCheck !== false && isset($_FILES['impFileSettings_button']) && is_uploaded_file($_FILES['impFileSettings_button']['tmp_name'])) {
                    $fileData = trim(file_get_contents($_FILES['impFileSettings_button']['tmp_name']));
                    while (substr($fileData, 0, 1) !== 'a') {
                        $fileData = substr($fileData, 1);
                    }
                    $uplOpt = maybe_unserialize($fileData);
                    if (is_array($uplOpt) && isset($uplOpt['imgNoCheck'])) {
                        $options = $uplOpt;
                        update_option($this->dbOptionsName, $options);
                    } else {
                        ?>
<div class="error" id="message"><p><strong>Incorrect Import file.</div><?php 
                    }
                }
            }
            if (isset($_POST['update_NS_SNAutoPoster_settings'])) {
                if (get_magic_quotes_gpc() || $_POST['nxs_mqTest'] == "\\'") {
                    array_walk_recursive($_POST, 'nsx_stripSlashes');
                }
                array_walk_recursive($_POST, 'nsx_fixSlashes');
                //## Load Networks Settings
                foreach ($nxs_snapAvNts as $avNt) {
                    if (isset($_POST[$avNt['lcode']])) {
                        $clName = 'nxs_snapClass' . $avNt['code'];
                        if (!isset($options[$avNt['lcode']])) {
                            $options[$avNt['lcode']] = array();
                        }
                        $ntClInst = new $clName();
                        $ntOpt = $ntClInst->setNTSettings($_POST[$avNt['lcode']], $options[$avNt['lcode']]);
                        $options[$avNt['lcode']] = $ntOpt;
                    }
                }
                if (isset($_POST['apCats'])) {
                    $options['apCats'] = $_POST['apCats'];
                }
                if (isset($_POST['nxsHTDP'])) {
                    $options['nxsHTDP'] = $_POST['nxsHTDP'];
                }
                if (isset($_POST['ogImgDef'])) {
                    $options['ogImgDef'] = $_POST['ogImgDef'];
                }
                if (isset($_POST['featImgLoc'])) {
                    $options['featImgLoc'] = $_POST['featImgLoc'];
                }
                if (isset($_POST['anounTagLimit'])) {
                    $options['anounTagLimit'] = $_POST['anounTagLimit'];
                }
                if (isset($_POST['featImgLocPrefix'])) {
                    $options['featImgLocPrefix'] = $_POST['featImgLocPrefix'];
                }
                if (isset($_POST['featImgLocArrPath'])) {
                    $options['featImgLocArrPath'] = $_POST['featImgLocArrPath'];
                }
                if (isset($_POST['nxsURLShrtnr'])) {
                    $options['nxsURLShrtnr'] = $_POST['nxsURLShrtnr'];
                }
                if (isset($_POST['bitlyUname'])) {
                    $options['bitlyUname'] = $_POST['bitlyUname'];
                }
                if (isset($_POST['bitlyAPIKey'])) {
                    $options['bitlyAPIKey'] = $_POST['bitlyAPIKey'];
                }
                if (isset($_POST['YOURLSKey'])) {
                    $options['YOURLSKey'] = $_POST['YOURLSKey'];
                }
                if (isset($_POST['YOURLSURL'])) {
                    $options['YOURLSURL'] = $_POST['YOURLSURL'];
                }
                if (isset($_POST['gglAPIKey'])) {
                    $options['gglAPIKey'] = $_POST['gglAPIKey'];
                }
                if ($options['nxsURLShrtnr'] == 'B' && (trim($_POST['bitlyAPIKey']) == '' || trim($_POST['bitlyAPIKey']) == '')) {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if ($options['nxsURLShrtnr'] == 'Y' && (trim($_POST['YOURLSKey']) == '' || trim($_POST['YOURLSURL']) == '')) {
                    $options['nxsURLShrtnr'] = 'G';
                }
                if (isset($_POST['nsOpenGraph'])) {
                    $options['nsOpenGraph'] = $_POST['nsOpenGraph'];
                } else {
                    $options['nsOpenGraph'] = 0;
                }
                if (isset($_POST['imgNoCheck'])) {
                    $options['imgNoCheck'] = 0;
                } else {
                    $options['imgNoCheck'] = 1;
                }
                if (isset($_POST['useForPages'])) {
                    $options['useForPages'] = 1;
                } else {
                    $options['useForPages'] = 0;
                }
                if (isset($_POST['showPrxTab'])) {
                    $options['showPrxTab'] = 1;
                } else {
                    $options['showPrxTab'] = 0;
                }
                if (isset($_POST['useRndProxy'])) {
                    $options['useRndProxy'] = 1;
                } else {
                    $options['useRndProxy'] = 0;
                }
                if (isset($_POST['prxList'])) {
                    $options['prxList'] = $_POST['prxList'];
                }
                if (isset($_POST['addURLParams'])) {
                    $options['addURLParams'] = $_POST['addURLParams'];
                }
                if (isset($_POST['riActive'])) {
                    $options['riActive'] = 1;
                } else {
                    $options['riActive'] = 0;
                }
                if (isset($_POST['riHowManyPostsToTrack'])) {
                    $options['riHowManyPostsToTrack'] = $_POST['riHowManyPostsToTrack'];
                }
                if (isset($_POST['useUnProc'])) {
                    $options['useUnProc'] = $_POST['useUnProc'];
                } else {
                    $options['useUnProc'] = 0;
                }
                if (isset($_POST['nxsCPTSeld'])) {
                    $options['nxsCPTSeld'] = serialize($_POST['nxsCPTSeld']);
                }
                if (isset($_POST['post_category'])) {
                    $pk = $_POST['post_category'];
                    if (!is_array($pk)) {
                        $pk = urldecode($pk);
                        parse_str($pk);
                    }
                    $cIds = get_all_category_ids();
                    if (is_array($pk) && $cIds) {
                        $options['exclCats'] = serialize(array_diff($cIds, $pk));
                    } else {
                        $options['exclCats'] = '';
                    }
                }
                //prr($options['exclCats']);
                if (!isset($_POST['whoCanSeeSNAPBox'])) {
                    $_POST['whoCanSeeSNAPBox'] = array();
                }
                $_POST['whoCanSeeSNAPBox'][] = 'administrator';
                if (isset($_POST['whoCanSeeSNAPBox'])) {
                    $options['whoCanSeeSNAPBox'] = $_POST['whoCanSeeSNAPBox'];
                }
                if ($nxs_isWPMU && (!isset($options['suaMode']) || $options['suaMode'] == '')) {
                    $options['suaMode'] = $nxs_tpWMPU;
                }
                $editable_roles = get_editable_roles();
                foreach ($editable_roles as $roleX => $details) {
                    $role = get_role($roleX);
                    $role->remove_cap('see_snap_box');
                }
                foreach ($options['whoCanSeeSNAPBox'] as $uRole) {
                    $role = get_role($uRole);
                    $role->add_cap('see_snap_box');
                }
                update_option($this->dbOptionsName, $options);
                // prr($options);
                ?>
<div class="updated"><p><strong><?php 
                _e("Settings Updated.", 'nxs_snap');
                ?>
</strong></p></div><?php 
            }
            $isNoNts = true;
            foreach ($nxs_snapAvNts as $avNt) {
                if (isset($options[$avNt['lcode']]) && is_array($options[$avNt['lcode']]) && count($options[$avNt['lcode']]) > 0) {
                    $isNoNts = false;
                    break;
                }
            }
            $category_ids = get_all_category_ids();
            if (isset($options['exclCats'])) {
                $pk = maybe_unserialize($options['exclCats']);
            } else {
                $pk = '';
            }
            if (is_array($category_ids) && is_array($pk) && count($category_ids) == count($pk)) {
                ?>
  <div class="error" id="message"><p><strong>All your categories are excluded from auto-posting.</strong> Nothing will be auto-posted. Please Click "Settings Tab" and select some categories.</div>
<?php 
            }
            if (!$nxs_isWPMU) {
                $this->NS_SNAP_ShowPageTop();
            }
            ?>
            Please see the <a target="_blank" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress">detailed installation/configuration instructions</a> (will open in a new tab)<br/>
            <?php 
            if (!isset($options['hideTopTip']) || (int) $options['hideTopTip'] != 1) {
                /* ?>
                   <div id="nxs_TopTip" class="nxsInfoMsg" style="font-size: 11px; margin-left: 3px; max-width: 1100px; display: block; font-style: italic; margin-bottom: 5px;">Tip: If autoposting works when you click "Test" buttons, but is not working when you publish new posts, try to switch from "Scheduled" to "Immediately" in the Plugin Settings->Other Settings->How to make auto-posts. 
                     <span style="float: right;"><a style="text-decoration: none" href="#" onclick="nxs_hideTip('nxs_TopTip'); return false;">[Hide]</a></span>
                   </div>                       
                   <?php */
            } else {
                ?>
<br/><?php 
            }
            ?>
           
<ul class="nsx_tabs">
    <li><a href="#nsx_tab1">Your Social Networks Accounts</a></li>
    <li><a href="#nsx_tab2"><?php 
            _e('Settings', 'nxs_snap');
            ?>
</a></li>
    <?php 
            if (function_exists("nxs_showPRXTab") && (int) $options['showPrxTab'] == 1) {
                ?>
 <li><a href="#nsx_tab5">Proxies</a></li> <?php 
            }
            ?>
    <li><a href="#nsx_tab3">Log/History</a></li>
    <li><a href="#nsx_tab4">Help/Support</a></li>
</ul>
<form method="post" id="nsStForm" action="<?php 
            echo $nxs_snapThisPageUrl;
            ?>
">
<div class="nsx_tab_container">
    <div id="nsx_tab1" class="nsx_tab_content"><a href="#" class="NXSButton" id="nxs_snapAddNew">Add new account</a> <div class="nxsInfoMsg"><img style="position: relative; top: 8px;" alt="Arrow" src="<?php 
            echo $nxs_plurl;
            ?>
img/arrow_l_green_c1.png"/> You can add Facebook, Twitter, Google+, Pinterest, LinkedIn, Tumblr, Blogger/Blogspot, Delicious, etc accounts</div><br/><br/>
          <div id="nxs_spPopup"><span class="nxspButton bClose"><span>X</span></span>Add New Network: <select onchange="doShowFillBlockX(this.value);" id="nxs_ntType"><option value =""></option>
           <?php 
            foreach ($nxs_snapAvNts as $avNt) {
                if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']]) == 0) {
                    $mt = 0;
                } else {
                    $mt = 1 + max(array_keys($options[$avNt['lcode']]));
                }
                echo '<option value ="' . $avNt['code'] . $mt . '">' . $avNt['name'] . '</option>';
            }
            ?>
           </select>           
           <div id="nsx_addNT">
             <?php 
            foreach ($nxs_snapAvNts as $avNt) {
                $clName = 'nxs_snapClass' . $avNt['code'];
                $ntClInst = new $clName();
                if (!isset($options[$avNt['lcode']]) || count($options[$avNt['lcode']]) == 0) {
                    $ntClInst->showNewNTSettings(0);
                } else {
                    $mt = 1 + max(array_keys($options[$avNt['lcode']]));
                    if (function_exists('nxs_doSMAS1')) {
                        nxs_doSMAS1($ntClInst, $mt);
                    } else {
                        nxs_doSMAS($avNt['name'], $avNt['code'] . $mt);
                    }
                }
            }
            ?>
           
           </div>
           
           </div>
           
           <div class="popShAtt" id="popOnlyCat"><?php 
            _e('Only selected categories will be autoposted to this account', 'nxs_snap');
            ?>
</div>
           <div id="showCatSel" style="display: none;background-color: #fff; width: 300px; padding: 25px;"><span class="nxspButton bClose"><span>X</span></span>Select Categories: 
                    <div id="fbSelCats<?php 
            echo $ii;
            ?>
" class="categorydivInd" style="padding-left: 15px; background-color: #fff;"> 
       <a href="#" onclick="nxs_chAllCatsL(1, 'fbSelCats<?php 
            echo $ii;
            ?>
'); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCatsL(0, 'fbSelCats<?php 
            echo $ii;
            ?>
'); return false;">UnCheck all</a>
          <div id="category-all" class="tabs-panel"> <input type="hidden" id="tmpCatSelNT" name="tmpCatSelNT" value="" />
            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
                <?php 
            if (function_exists('wp_terms_checklist')) {
                wp_terms_checklist(0, $args);
            }
            ?>
            </ul>
          </div>  
       </div>    <div class="submit"><input type="button" id="" class="button-primary" name="btnSelCats" onclick="nxs_doSetSelCats( jQuery('#tmpCatSelNT').val() ); $('#showCatSel').bPopup().close();" value="Select Categories" /></div>
           </div>
           
            <?php 
            wp_nonce_field('nsDN', 'nsDN_wpnonce');
            foreach ($nxs_snapAvNts as $avNt) {
                $clName = 'nxs_snapClass' . $avNt['code'];
                $ntClInst = new $clName();
                if (isset($options[$avNt['lcode']]) && count($options[$avNt['lcode']]) > 0) {
                    $ntClInst->showGenNTSettings($options[$avNt['lcode']]);
                }
                // else $ntClInst->showNewNTSettings(0);
            }
            if ($isNoNts) {
                ?>
<br/><br/><br/>You don't have any configured social networks yet. Please click "Add new account" button.<?php 
            } else {
                ?>
   
             
           <div style="float: right; padding: 1.5em;">
           
            <input onclick="nxs_expSettings(); return false;" type="button" class="button" name="expSettings_repostButton" id="expSettings_button"  value="<?php 
                _e('Export Settings', 'nxs_snap');
                ?>
" />
            <input onclick="jQuery('#impFileSettings_button').click(); return false;" type="button" class="button" name="impSettings_repostButton" id="impSettings_button"  value="<?php 
                _e('Import Settings', 'nxs_snap');
                ?>
" />            
           </div>
           <input value="'" type="hidden" name="nxs_mqTest" /> 
           <div class="submit"><input type="submit" id="nxs-button-primary-submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
                _e('Update Settings', 'nxs_snap');
                ?>
" /></div>
           
           <?php 
            }
            ?>
   
    </div> <!-- END TAB -->
    <div id="nsx_tab2" class="nsx_tab_content">
     <!-- ##################### OTHER #####################-->            
            <?php 
            wp_nonce_field('nxsSsPageWPN', 'nxsSsPageWPN_wpnonce');
            ?>
              
     <!-- How to make auto-posts? --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('How to make auto-posts?', 'nxs_snap');
            ?>
 &lt;-- (<a id="showShAttIS" onmouseover="showPopShAtt('IS', event);" onmouseout="hidePopShAtt('IS');"  onclick="return false;" class="underdash" href="#"><?php 
            _e('What\'s the difference?', 'nxs_snap');
            ?>
</a>)</h3></div>
         <div class="popShAtt" id="popShAttIS">
        <h3><?php 
            _e('The difference between "Immediately" and "Scheduled"', 'nxs_snap');
            ?>
</h3>
        <?php 
            _e('<b>"Immediately"</b> - Once you click "Publish" button plugin starts pushing your update to configured social networks. At this time you need to wait and look at the turning circle. Some APIs are pretty slow, so you have to wait and wait and wait until all updates are posted and page released back to you.', 'nxs_snap');
            ?>
<br/><br/>
        <?php 
            _e('<b>"Scheduled"</b> - Releases the page immediately back to you, so you can proceed with something else and it schedules all auto-posting jobs to your WP-Cron. This is much faster and much more efficient, but it could not work if your WP-Cron is disabled or broken.', 'nxs_snap');
            ?>
      </div>
             <div class="nxs_box_inside"> 
              <div class="itemDiv">
               <input type="radio" name="nxsHTDP" value="I" <?php 
            if (isset($options['nxsHTDP']) && $options['nxsHTDP'] == 'I') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Publish Immediately', 'nxs_snap');
            ?>
</b>  - <i><?php 
            _e('Use if WP Cron is disabled or broken on your website', 'nxs_snap');
            ?>
</i><br/>
              </div>  
              
              <div class="itemDiv">
              <input type="radio" name="nxsHTDP" value="S" <?php 
            if (!isset($options['nxsHTDP']) || $options['nxsHTDP'] == 'S') {
                echo 'checked="checked"';
            }
            ?>
 /> <b><?php 
            _e('Schedule (Recommended)', 'nxs_snap');
            ?>
</b> - <i><?php 
            _e('Faster Performance - requires working WP Cron', 'nxs_snap');
            ?>
</i><br/> <?php 
            /* ?>
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="runNXSCron" value="1"> <b><?php _e('Try to process missed "Scheduled" posts.', 'nxs_snap') ?></b> <i><?php _e('Usefull when WP Cron is disabled or broken, but can cause some short perfomance issues and duplicates. It is <b>highly</b> recomended to setup a proper cron job of fix WP Cron instead', 'nxs_snap') ?></i>. <?php */
            ?>
              </div>                          
           </div></div>
     <!-- #### Who can see auto-posting options on the "New Post" pages? ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Who can see auto-posting options on the "New Post" pages?', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> 
              <div class="itemDiv">
              <?php 
            $editable_roles = get_editable_roles();
            if (!isset($options['whoCanSeeSNAPBox']) || !is_array($options['whoCanSeeSNAPBox'])) {
                $options['whoCanSeeSNAPBox'] = array();
            }
            foreach ($editable_roles as $role => $details) {
                $name = translate_user_role($details['name']);
                echo '<input type="checkbox" ';
                if (in_array($role, $options['whoCanSeeSNAPBox']) || $role == 'administrator') {
                    echo ' checked="checked" ';
                }
                if ($role == 'administrator' || $role == 'subscriber') {
                    echo '  disabled="disabled" ';
                }
                echo 'name="whoCanSeeSNAPBox[]" value="' . esc_attr($role) . '"> ' . $name;
                if ($role == 'administrator') {
                    echo ' - Somebody who has access to all the administration features';
                }
                if ($role == 'editor') {
                    echo " - Somebody who can publish and manage posts and pages as well as manage other users' posts, etc. ";
                }
                if ($role == 'author') {
                    echo ' - Somebody who can publish and manage their own posts ';
                }
                if ($role == 'contributor') {
                    echo ' - Somebody who can write and manage their posts but not publish them';
                }
                if ($role == 'subscriber') {
                    echo ' - Somebody who can only manage their profile';
                }
                echo '<br/>';
            }
            ?>
              </div>
              
           </div></div>        
     <!-- #### Include/Exclude Wordpress Pages and Custom Post Types ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Include/Exclude Wordpress Pages and Custom Post Types', 'nxs_snap');
            ?>
</h3></div>                          
             <div class="nxs_box_inside"> 
             <div class="itemDiv">
              <input value="set" id="useForPages" name="useForPages"  type="checkbox" <?php 
            if ((int) $options['useForPages'] == 1) {
                echo "checked";
            }
            ?>
 />  <b><?php 
            _e('Use for Wordpress Pages', 'nxs_snap');
            ?>
</b>     
             <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Show the SNAP metabox and auto-post for pages, not just posts.', 'nxs_snap');
            ?>
</span>  
             </div>
              <div class="itemDiv"><b><br/><?php 
            _e('Custom Post Types:', 'nxs_snap');
            ?>
</b>              
              <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Please select "Custom Post Types" that you would like to be autoposted to your social networks', 'nxs_snap');
            ?>
 </span> <br/>              
              <?php 
            $nxsOne = base64_encode("v=" . $nxsOne);
            $args = array('public' => true, '_builtin' => false);
            $output = 'names';
            $operator = 'and';
            $post_types = array();
            if (function_exists('get_post_types')) {
                $post_types = get_post_types($args, $output, $operator);
            }
            if ($options['nxsCPTSeld'] != '') {
                $nxsCPTSeld = unserialize($options['nxsCPTSeld']);
            } else {
                $nxsCPTSeld = array_keys($post_types);
            }
            ?>
            <select multiple="multiple" name="nxsCPTSeld[]" id="nxsCPTSeld" class="nxsMultiSelect" size="<?php 
            echo count($post_types) + 2;
            ?>
">
            <option <?php 
            if (count($nxsCPTSeld) == 0) {
                echo 'selected="selected"';
            }
            ?>
 value="-----">----------------------- None -----------------------</option>
            <?php 
            foreach ($post_types as $cptID => $cptName) {
                ?>
<option <?php 
                if (in_array($cptID, $nxsCPTSeld)) {
                    echo 'selected="selected"';
                }
                ?>
 value="<?php 
                echo $cptID;
                ?>
"><?php 
                echo $cptName;
                ?>
</option><?php 
            }
            ?>
            </select>  
              </div>
              
           </div></div>            
     <!-- #### Categories to Include/Exclude: ##### --> 
            <script type="text/javascript"> function nxs_chAllCats(ch){ jQuery("form input:checkbox[name='post_category[]']").attr('checked', ch==1);}
     (function($) { $(function() {
       $('.button-primary[name="update_NS_SNAutoPoster_settings"]').bind('click', function(e) { var str = $('input[name="post_category[]"]').serialize(); $('div.categorydivInd').replaceWith('<input type="hidden" name="pcInd" value="" />'); 
         str = str.replace(/post_category/g, "pk"); $('div.categorydiv').replaceWith('<input type="hidden" name="post_category" value="'+str+'" />');  
     }); }); })(jQuery); </script>                 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Categories to Include/Exclude:', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Each blogpost will be autoposted to all categories selected below. All categories are selected by default. 
              <b>Uncheck</b> categories that you would like <b>NOT</b> to auto-post by default. Assigning the uncheked category to the new blogpost will turn off auto-posting to all configured networks.', 'nxs_snap');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <a href="#" onclick="nxs_chAllCats(1); return false;">Check all</a> &nbsp;|&nbsp; <a href="#" onclick="nxs_chAllCats(0); return false;">UnCheck all</a>

 <div id="taxonomy-category" class="categorydiv">
        <div id="category-all" class="tabs-panel"><input type='hidden' name='post_category[]' value='0' />
            <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
                <?php 
            if (isset($options['exclCats'])) {
                $pk = maybe_unserialize($options['exclCats']);
            } else {
                $pk = '';
            }
            if (is_array($pk) && count($pk) > 0) {
                $selCats = array_diff($category_ids, $pk);
            } else {
                $selCats = $category_ids;
            }
            $args = array('descendants_and_self' => 0, 'selected_cats' => $selCats, 'taxonomy' => 'category', 'checked_ontop' => false);
            if (function_exists('wp_terms_checklist')) {
                wp_terms_checklist(0, $args);
            }
            ?>
            </ul>
        </div>  
    </div>
              </div>              
           </div></div>    
     <!-- ##################### URL Shortener #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('URL Shortener', 'nxs_snap');
            ?>
</h3></div>
            <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;">Please use %SURL% in "Message Format" to get shortened urls. </span> <br/>
              <!-- <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="G" <?php 
            if (!isset($options['nxsURLShrtnr']) || $options['nxsURLShrtnr'] == '' || $options['nxsURLShrtnr'] == 'G') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>gd.is</b> (Default) - fast, simple, free, no configuration nessesary.            
              </div> -->
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="O" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'O' || $options['nxsURLShrtnr'] == '' || $options['nxsURLShrtnr'] == 'G') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>goo.gl</b>  - <i> Enter goo.gl <a target="_blank" href="https://developers.google.com/url-shortener/v1/getting_started#APIKey">API Key</a> below [Optional]</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goo.gl&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="gglAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['gglAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['gglAPIKey']), 'nxs_snap');
            }
            ?>
" />
              </div>
              
              <?php 
            if (function_exists('wp_get_shortlink')) {
                ?>
<div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="W" <?php 
                if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'W') {
                    echo 'checked="checked"';
                }
                ?>
 /> <b>Wordpress Built-in Shortener</b> (wp.me if you use Jetpack)<br/> 
              </div><?php 
            }
            ?>
              
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="B" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'B') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>bit.ly</b>  - <i>Enter bit.ly username and <a target="_blank" href="http://bitly.com/a/your_api_key">API Key</a> below</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly Username: <input name="bitlyUname" style="width: 20%;" value="<?php 
            if (isset($options['bitlyUname'])) {
                _e(apply_filters('format_to_edit', $options['bitlyUname']), 'nxs_snap');
            }
            ?>
" /><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bit.ly&nbsp;&nbsp;API Key:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="bitlyAPIKey" style="width: 20%;" value="<?php 
            if (isset($options['bitlyAPIKey'])) {
                _e(apply_filters('format_to_edit', $options['bitlyAPIKey']), 'nxs_snap');
            }
            ?>
" />
              </div>
              
              <div class="itemDiv">
              <input type="radio" name="nxsURLShrtnr" value="Y" <?php 
            if (isset($options['nxsURLShrtnr']) && $options['nxsURLShrtnr'] == 'Y') {
                echo 'checked="checked"';
            }
            ?>
 /> <b>YOURLS (Your Own URL Shortener)</b> - 
            &nbsp;<i>YOURLS API URL - usually sonething like http://yourdomain.cc/yourls-api.php; YOURLS API Secret Signature Token can be found in your YOURLS Admin Panel-&gt;Tools</i><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API URL: <input name="YOURLSURL" style="width: 19.4%;" value="<?php 
            if (isset($options['YOURLSURL'])) {
                _e(apply_filters('format_to_edit', $options['YOURLSURL']), 'nxs_snap');
            }
            ?>
" /><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YOURLS API Secret Signature Token:&nbsp;&nbsp;&nbsp;<input name="YOURLSKey" style="width: 13%;" value="<?php 
            if (isset($options['YOURLSKey'])) {
                _e(apply_filters('format_to_edit', $options['YOURLSKey']), 'nxs_snap');
            }
            ?>
" />
              </div>
              
            </div></div>
     <!-- ##################### Auto-Import comments from Social Networks #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Auto-Import comments from Social Networks', 'nxs_snap');
            ?>
<span class="nxs_newLabel">[<?php 
            _e('New', 'nxs_snap');
            ?>
]</span></h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;">Plugin will automatically grab the comments posted on Social Networks and insert them as "Comments to your post". Plugin will check for the new comments every hour. </span> <br/>
              <div class="itemDiv">
              <input value="set" id="riActive" name="riActive"  type="checkbox" <?php 
            if ((int) $options['riActive'] == 1) {
                echo "checked";
            }
            ?>
 /> 
              <strong>Enable "Comments Import"</strong>
              </div>
              <div class="itemDiv">
             <strong style="font-size: 12px; margin: 10px; margin-left: 1px;">How many posts should be tracked:</strong>
<input name="riHowManyPostsToTrack" style="width: 50px;" value="<?php 
            if (isset($options['riHowManyPostsToTrack'])) {
                _e(apply_filters('format_to_edit', $options['riHowManyPostsToTrack']), 'nxs_snap');
            } else {
                echo "10";
            }
            ?>
" /> <br/>
              
             <span style="font-size: 11px; margin-left: 1px;">Setting two many will degrade your website's performance. 10-20 posts are recommended</span> 
              </div>
              
           </div></div>
     <!-- ##################### Additional URL Parameters #####################-->   
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Additional URL Parameters', 'nxs_snap');
            ?>
 <span class="nxs_newLabel">[<?php 
            _e('New', 'nxs_snap');
            ?>
]</span></h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Will be added to backlinks.', 'nxs_snap');
            ?>
 </span> <br/>
              <div class="itemDiv">
                <b><?php 
            _e('Additional URL Parameters:', 'nxs_snap');
            ?>
</b>  <input name="addURLParams" style="width: 800px;" value="<?php 
            if (isset($options['addURLParams'])) {
                _e(apply_filters('format_to_edit', $options['addURLParams']), 'nxs_snap');
            }
            ?>
" />
              </div>               
             <span style="font-size: 11px; margin-left: 1px;"> <?php 
            _e('You can use %NTNAME% for social network name, %NTCODE% for social network two-letter code, %ACCNAME% for account name,  %POSTID% for post ID,  %POSTTITLE% for post title, %SITENAME% for website name. <b>Any text must be URL Encoded</b><br/>Example: utm_source=%NTCODE%&utm_medium=%ACCNAME%&utm_campaign=SNAP%2Bfrom%2B%SITENAME%', 'nxs_snap');
            ?>
</span> 
           </div></div>    
           
            <!-- ##### ANOUNCE TAG ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('%ANNOUNCE% tag settings', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Plugin will take text untill the &lt;!--more--&gt; tag. Please specify how many characters should it get if &lt;!--more--&gt; tag is not found', 'nxs_snap');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('How many characters:', 'nxs_snap');
            ?>
</b> <input name="anounTagLimit" style="width: 100px;" value="<?php 
            if (isset($options['anounTagLimit'])) {
                _e(apply_filters('format_to_edit', $options['anounTagLimit']), 'nxs_snap');
            } else {
                echo "300";
            }
            ?>
" />              
              </div>              
           </div></div>  
                           
     <!-- ##################### Open Graph #####################-->
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('"Open Graph" Tags', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('"Open Graph" tags are used for generating title, description and preview image for your Facebook and Google+ posts. This is quite simple implementation of "Open Graph" Tags. This option will only add tags needed for "Auto Posting". If you need something more serious uncheck this and use other specialized plugins.', 'nxs_snap');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <input value="1" id="nsOpenGraph" name="nsOpenGraph"  type="checkbox" <?php 
            if ((int) $options['nsOpenGraph'] == 1) {
                echo "checked";
            }
            ?>
 /> <b><?php 
            _e('Add Open Graph Tags', 'nxs_snap');
            ?>
</b>
              </div>                           
              <div class="itemDiv">
             <b><?php 
            _e('Default Image URL for og:image tag:', 'nxs_snap');
            ?>
</b> 
            <input name="ogImgDef" style="width: 30%;" value="<?php 
            if (isset($options['ogImgDef'])) {
                _e(apply_filters('format_to_edit', $options['ogImgDef']), 'nxs_snap');
            }
            ?>
" />
              </div>             
           </div></div>    
            <!-- #### "Featured" Image ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Advanced "Featured" Image Settings', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> 
              <div class="itemDiv">
              <input value="set" id="imgNoCheck" name="imgNoCheck"  type="checkbox" <?php 
            if ((int) $options['imgNoCheck'] != 1) {
                echo "checked";
            }
            ?>
 /> <strong>Verify "Featured" Image</strong>               
              <br/><span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Advanced Setting. Uncheck only if you are 100% sure that your images are valid or if you have troubles with image verification.', 'nxs_snap');
            ?>
 </span> <br/>
              </div>
              
               <div class="itemDiv">
             <input value="1" id="useUnProc" name="useUnProc"  type="checkbox" <?php 
            if (isset($options['useUnProc']) && (int) $options['useUnProc'] == 1) {
                echo "checked";
            }
            ?>
 /> 
             <b><?php 
            _e('Use advanced image finder', 'nxs_snap');
            ?>
</b>
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;"> <?php 
            _e('Check this if your images could be found only in the fully processed posts. <br/>This feature could interfere with some plugins using post processing functions incorrectly. Your site could become messed up, have troubles displaying content or start giving you "ob_start() [ref.outcontrol]: Cannot use output buffering in output buffering display handlers" errors.', 'nxs_snap');
            ?>
</span> 
              </div>  
              
           </div></div>        
    
      <!-- ##### Alternative "Featured Image" location ##### --> 
            <div class="nxs_box"> <div class="nxs_box_header"><h3><?php 
            _e('Alternative "Featured Image" location', 'nxs_snap');
            ?>
</h3></div>
             <div class="nxs_box_inside"> <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Plugin uses standard Wordpress "Featured Image" by default. If your theme stores "Featured Image" in the custom field, please enter the name of it. Use prefix if your custom field has only partial location.', 'nxs_snap');
            ?>
 </span> <br/>
              <div class="itemDiv">
              <b><?php 
            _e('Custom field name:', 'nxs_snap');
            ?>
</b> <input name="featImgLoc" style="width: 200px;" value="<?php 
            if (isset($options['featImgLoc'])) {
                _e(apply_filters('format_to_edit', $options['featImgLoc']), 'nxs_snap');
            }
            ?>
" />
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;"><?php 
            _e('Set the name of the custom field that contains image info', 'nxs_snap');
            ?>
</span> 
              </div>
              <div class="itemDiv">
             <b><?php 
            _e('Custom field Array Path:', 'nxs_snap');
            ?>
</b> <input name="featImgLocArrPath" style="width: 200px;" value="<?php 
            if (isset($options['featImgLocArrPath'])) {
                _e(apply_filters('format_to_edit', $options['featImgLocArrPath']), 'nxs_snap');
            }
            ?>
" /> 
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;">[<?php 
            _e('Optional', 'nxs_snap');
            ?>
] <?php 
            _e('If your custom field contain an array, please enter the path to the image field. For example: [\'images\'][\'image\']', 'nxs_snap');
            ?>
</span> 
              </div>
              <div class="itemDiv">
             <b><?php 
            _e('Custom field Image Prefix:', 'nxs_snap');
            ?>
</b> <input name="featImgLocPrefix" style="width: 200px;" value="<?php 
            if (isset($options['featImgLocPrefix'])) {
                _e(apply_filters('format_to_edit', $options['featImgLocPrefix']), 'nxs_snap');
            }
            ?>
" /> 
              <br/>              
             <span style="font-size: 11px; margin-left: 1px;">[<?php 
            _e('Optional', 'nxs_snap');
            ?>
] <?php 
            _e('If your custom field contain only the last part of the image path, please enter the prefix', 'nxs_snap');
            ?>
</span> 
              </div>
           </div></div>                 
    
           
     
     <?php 
            if (function_exists("nxs_showPRXTab")) {
                ?>
          
      <h3 style="font-size: 14px; margin-bottom: 2px;">Show "Proxies" Tab</h3>             
        <p style="margin: 0px;margin-left: 5px;"><input value="set" id="showPrxTab" name="showPrxTab"  type="checkbox" <?php 
                if ((int) $options['showPrxTab'] == 1) {
                    echo "checked";
                }
                ?>
 /> 
          <strong>Show "Proxies" Tab</strong> <span style="font-size: 11px; margin-left: 1px;">Advanced Setting. Check to enable "Proxies" tab where you can setup autoposting proxies.</span>            
        </p>    
      <?php 
            }
            ?>
       
           
      <div class="submit"><input type="submit" class="button-primary" name="update_NS_SNAutoPoster_settings" value="<?php 
            _e('Update Settings', 'nxs_snap');
            ?>
" /></div>           
    </div>
    
    <?php 
            if (function_exists("nxs_showPRXTab") && (int) $options['showPrxTab'] == 1) {
                nxs_showPRXTab($options);
            }
            ?>
    <div id="nsx_tab3" class="nsx_tab_content"> 
    <div style="width:760px;">
    <a href="#" style="float: right" onclick="nxs_rfLog();return false;" class="NXSButton" id="nxs_clearLog">Refresh</a>
    
    Showing last 150 records <a href="#" onclick="nxs_clLog();return false;" class="NXSButton" id="nxs_clearLog">Clear Log</a><br/><br/>    
      <div style="overflow: auto; border: 1px solid #999; width: 750px; height: 600px; font-size: 11px;" class="logDiv" id="nxslogDiv">
        <?php 
            //$logInfo = maybe_unserialize(get_option('NS_SNAutoPosterLog'));
            $logInfo = nxs_getnxsLog();
            if (is_array($logInfo)) {
                foreach (array_reverse($logInfo) as $logline) {
                    if ($logline['type'] == 'E') {
                        $actSt = "color:#FF0000;";
                    } elseif ($logline['type'] == 'M') {
                        $actSt = "color:#585858;";
                    } elseif ($logline['type'] == 'BG') {
                        $actSt = "color:#008000; font-weight:bold;";
                    } elseif ($logline['type'] == 'I') {
                        $actSt = "color:#0000FF;";
                    } elseif ($logline['type'] == 'W') {
                        $actSt = "color:#DB7224;";
                    } elseif ($logline['type'] == 'BI') {
                        $actSt = "color:#0000FF; font-weight:bold;";
                    } elseif ($logline['type'] == 'GR') {
                        $actSt = "color:#008080;";
                    } elseif ($logline['type'] == 'S') {
                        $actSt = "color:#005800; font-weight:bold;";
                    } else {
                        $actSt = "color:#585858;";
                    }
                    if ($logline['type'] == 'E') {
                        $msgSt = "color:#FF0000;";
                    } elseif ($logline['type'] == 'BG') {
                        $msgSt = "color:#008000; font-weight:bold;";
                    } else {
                        $msgSt = "color:#585858;";
                    }
                    if ($logline['nt'] != '') {
                        $ntInfo = ' [' . $logline['nt'] . '] ';
                    } else {
                        $ntInfo = '';
                    }
                    echo '<snap style="color:#008000">[' . $logline['date'] . ']</snap> - <snap style="' . $actSt . '">[' . $logline['act'] . ']</snap>' . $ntInfo . '-  <snap style="' . $msgSt . '">' . $logline['msg'] . '</snap> ' . $logline['extInfo'] . '<br/>';
                }
            }
            ?>
      </div>        
    </div>        
    </div>
    
    <div id="nsx_tab4" class="nsx_tab_content"> 
     
     <div style="max-width:1000px;"> 
     
<h3> Setup/Installation/Configuration Instructions   </h3>
     <table style="max-width:1000px"><tr><td valign="top" width="250">
     
     
     
   <div style="margin:0 25px 0 0; line-height: 24px;">   

<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/application_form.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/installation-of-social-networks-auto-poster-for-wordpress/">Plugin Setup/Installation</a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/facebook.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-facebook-social-networks-auto-poster-wordpress/">  Facebook </a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/twitter.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-twitter-social-networks-auto-poster-wordpress/">  Twitter </a>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/googleplus.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-google-plus-social-networks-auto-poster-wordpress/"> Google+ </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/pinterest.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-pinterest-social-networks-auto-poster-wordpress/">  Pinterest</a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/tumblr.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-tumblr-social-networks-auto-poster-wordpress/">  Tumblr </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/linkedin.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-linkedin-social-networks-auto-poster-wordpress/">  LinkedIn </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/blogger.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-blogger-social-networks-auto-poster-wordpress/">  Blogger </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/delicious.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-delicious-social-networks-auto-poster-wordpress/"> Delicious </a>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a style="background-image:url(<?php 
            echo $nxs_plurl;
            ?>
img/led/blogcom.png) !important;" class="nxs_icon16" target="_parent" href="http://www.nextscripts.com/setup-installation-wp-based-social-networks-auto-poster-wordpress/"> Wordpress.com/Blog.com</a>
<br/><br/>
<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/faq">FAQ</a><br/>
<a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/troubleshooting-social-networks-auto-poster">Troubleshooting FAQ</a>

</div>

</td>
<td  valign="top" style="font-size: 14px;">
<h3 style="margin-top: 0px;">Have questions/suggestions?</h3>
<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/contact-us">===&gt; Contact us &lt;===</a> <br/>
<h3 style="margin-top: 20px;">Have troubles/problems/found a bug?</h3>
<a style="font-weight: normal; font-size: 18px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/support">===&gt; Open support ticket &lt;===</a>


<h3 style="margin-top: 30px;">Like the Plugin? Would you like to support developers?</h3>
<div style="line-height: 24px;">
<b>Here is what you can do:</b><br/>
<?php 
            if (function_exists('doPostToGooglePlus')) {
                ?>
<s><?php 
            }
            ?>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> Get the <a href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts/#getit">"Pro" Edition</a>. You will be able to add several accounts for each network as well as post to Google+, Pinterest and LinkedIn company pages.<?php 
            if (function_exists('doPostToGooglePlus')) {
                ?>
</s> <i>Done! Thank you!</i><?php 
            }
            ?>
<br/>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> Rate the plugin 5 stars at <a href="http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/">wordpress.org page</a>.<br/>
<img src="<?php 
            echo $nxs_plurl;
            ?>
img/snap-icon12.png"/> <a href="<?php 
            echo admin_url();
            ?>
post-new.php">Write a blogpost</a> about the plugin and don't forget to auto-post this blogpost to all your social networks ;-).<br/>
</div>
</td></tr></table>
   
   <br/><br/>
   <h3>Solutions for some common problems </h3>
   
   <b>Problem:</b> <i>I can't create an app on developers.facebook.com/apps</i>. When I am trying to enter that page it redirects me back to my account?<br/>
<b>Solution:</b> Facebook "Business" or "Advertising" accounts can't manage apps. This is an unavoidable Facebook limitation. Only real user accounts are able to create and manage apps. Please login to Facebook as a personal account to be able to create app. You will need to add your personal Facebook account as "Administrator" to your page..
   <br/><br/>
   <b>Problem:</b> When I follow the instructions to allow plugin authorize/access to my Facebook/Twitter/Tumblr/LinkedIn account, it redirects me to my <i>"Google Analytics for WordPress Configuration"</i> page.<br/>
<b>Solution:</b> It's a known issue. Google Analytics plugin hijacks the authorization workflow. Please temporary deactivate Google Analytics plugin, do all authorizations and then activate it back. There are some other plugins ("Blog Promoter", "Tweet Old Post", etc.. ) that could also hijack the authorization. Solution is the same: Deactivate the other plugin, do authorization, reactivate it.   
<br/><br/>

 <b>Problem:</b> Plugin breaks <i>NextGen galleries</i>. I got error <i>"Fatal error: Class 'nggMeta' not found"</i>.<br/>
<b>Solution:</b>There is a known bug in NextGen galleries that was reported back to them over a year ago, but still hasn't been fixed. Any plugin calling standard wordpress function apply_filters('the_content' will break NextGen galleries.
We have posted the solution here: <a target="_blank" href="http://wordpress.org/support/topic/plugin-nextgen-gallery-fatal-error-insert-picture-in-event?replies=4">http://wordpress.org/support/topic/plugin-nextgen-gallery-fatal-error-insert-picture-in-event?replies=4</a>
<br/><br/>

<b>Problem:</b> When I publish a new post to <i>Facebook</i> I am getting this weird Twitter Error:<i> Error:(#100) The status you are trying to publish is a duplicate of, or too similar to, one that we recently posted to Twitter</i>.<br/>
<b>Solution:</b> Your Facebook is already auto-posting to Twitter. When it sees the same tweet made by our plugin it fails with this error. You need to either unlink your Facebook from Twitter or disable Twitter auto-posting from our plugin.
If you decide to unlink your Facebook from Twitter:<br/>
Go to http://www.facebook.com/twitter and remove the link to twitter from the affected wall (Click on "Unlink from Twitter").
<br/><br/>

<b>Problem:</b> Facebook Error: <i>"The user hasn't authorized the application to perform this action"</i><br/>
<b>Solution:</b>
The most popular cause for "The user hasn't authorized the application to perform this action" is that your domain is not configured for your app.<br/>
Please read and carefully follow the installation instructions:<br/>
You missed/messed steps 1.4 and 1.5 from Facebook section:<br/>
4. Click "Website", enter your website URL<br/>
5. Enter your domain to the App Domain. Domain should be the same domain from URL that you have entered to the "Website" during the step 4.
<br/><br/>


<b>Problem:</b> Facebook Error:  <i>SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</i><br/>
<b>Solution:</b>
This error means that cURL is misconfigured on your server. Most probably curl ssl(open SSL) is broken or it simply can't find the certificates at the pointed location. Please contact your hosting provider and ask them to fix this.<br/>
http://curl.haxx.se/docs/sslcerts.html<br/>
Unlike Twitter or Google+ that could be automatically switched to non-SSL connections in such cases, Facebook requires to be accessed by SSL at all times.

<br/><br/>

<b>Problem:</b> Twitter Error:  <i>{"error":"Read-only application cannot POST","request":"/1/statuses/update.json"}</i><br/>
<b>Solution:</b>You just need to follow the instructions step by step. Please don't skip anything.<br/>
<br/>
Please see #4 and #5 for Twitter:<br/>
<br/>
4. Click "Settings" tab. Scroll to the "Application type", change Access level from "Read Only" to <b>"Read and Write"</b>. Click "Update this Twitter application settings".<br/>
5. Come back to "Details" tab. Scroll to the "Your access token" and click "Create my access token" button. Refresh page and notice "Access token" and "Access token secret". Make sure you have <b>"Read and Write"</b> access level.<br/>

    </div> 
        
    </div>
</div>
           
           </form>
           
           <form method="post" enctype="multipart/form-data"  id="nsStFormUpl" action="<?php 
            echo $nxs_snapThisPageUrl;
            ?>
">
              <input type="file" accept="text/plain" onchange="jQuery('#nsStFormUpl').submit();" id="impFileSettings_button" name="impFileSettings_button" style="display: block; visibility: hidden; width: 0; height: 0;" size="chars">
              <input type="hidden" value="1" name="upload_NS_SNAutoPoster_settings" /> <input value="'" type="hidden" name="nxs_mqTest" />  <?php 
            wp_nonce_field('nxsChkUpl', 'nxsChkUpl_wpnonce');
            ?>
 
            </form>
           
           <br/>&nbsp;<br/>           <?php 
        }