function NS_SNAP_ShowPageTop() { global $nxs_snapAvNts, $nxs_snapThisPageUrl, $nxsOne, $nxs_plurl, $nxs_isWPMU, $nxs_skipSSLCheck; $nxsOne = ''; $cstIt = 0; $options = $this->nxs_options; if ($_GET['page'] == 'NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do'] == 'h') { nxs_do_this_hourly(); die; } if ($_GET['page'] == 'NextScripts_SNAP.php' && isset($_GET['do']) && $_GET['do'] == 'q') { nxs_do_post_from_query(); die; } if (function_exists('nxs_doSMAS5')) { $rf = new ReflectionFunction('nxs_doSMAS5'); $cstIt++; $rff = $rf->getFileName(); } $nxsOne = NextScripts_SNAP_Version; if (defined('NXSAPIVER')) { $nxsOne .= " (<span id='nxsAPIUpd'>API</span> Version: " . NXSAPIVER . ")"; } ?> <div style="float:right; padding-top: 10px; padding-right: 10px;"> <div style="float:right; text-align: center;"><a target="_blank" href="http://www.nextscripts.com"><img src="<?php echo $nxs_plurl; ?> img/Next_Scripts_Logo2.1-HOR-100px.png"></a><br/> <a style="font-weight: normal; font-size: 16px; line-height: 24px;" target="_blank" href="http://www.nextscripts.com/support">[<?php _e('Contact support', 'social-networks-auto-poster-facebook-twitter-g'); ?> ]</a> <?php if (!$options['isMA']) { ?> <br/> <span style="color:#800000;"><?php _e('Ready to to Upgrade to Multiple Accounts Edition<br/> and get Google+ and Pinterest Auto-Posting?', 'social-networks-auto-poster-facebook-twitter-g'); ?> </span> <?php if (function_exists('nxsDoLic_ajax')) { ?> <br/><a style="font-weight: normal; font-size: 12px; line-height: 24px;" target="_blank" id="showLic" href="#">[<?php _e('Enter your Activation Key', 'social-networks-auto-poster-facebook-twitter-g'); ?> ]</a> <?php } ?> <a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts#getit">[<?php _e('Get It here', 'social-networks-auto-poster-facebook-twitter-g'); ?> ]</a> <?php } ?> </div> <div id="showLicForm"><span class="nxspButton bClose"><span>X</span></span><div style="position: absolute; right: 10px; top:10px; font-size: 34px; font-weight: lighter;"><?php _e('Activation', 'social-networks-auto-poster-facebook-twitter-g'); ?> </div> <br/><br/> <h3><?php _e('Multiple Accounts Edition and Google+ and Pinterest Auto-Posting', 'social-networks-auto-poster-facebook-twitter-g'); ?> </h3><br/><?php _e('You can find your key on this page', 'social-networks-auto-poster-facebook-twitter-g'); ?> : <a href="http://www.nextscripts.com/mypage">http://www.nextscripts.com/mypage</a> <br/><br/> <?php _e('Enter your Key', 'social-networks-auto-poster-facebook-twitter-g'); ?> : <input name="eLic" id="eLic" style="width: 50%;"/> <input type="button" class="button-primary" name="eLicDo" onclick="doLic();" value="Enter" /> <br/><br/><?php _e('Your plugin will be automatically upgraded', 'social-networks-auto-poster-facebook-twitter-g'); ?> . <?php wp_nonce_field('doLic', 'doLic_wpnonce'); ?> </div> </div> <div class=wrap><h2><?php _e('Next Scripts: Social Networks Auto Poster Options', 'social-networks-auto-poster-facebook-twitter-g'); ?> </h2> <?php _e('Plugin Version', 'social-networks-auto-poster-facebook-twitter-g'); ?> : <span style="color:#008000;font-weight: bold;"><?php echo $nxsOne; ?> </span> <?php if ($options['isMA']) { ?> [Pro - Multiple Accounts Edition] <?php } else { ?> <span style="color:#800000; font-weight: bold;">[Single Accounts Edition]</span> <?php if (!$nxs_isWPMU) { ?> - <a target="_blank" href="http://www.nextscripts.com/social-networks-auto-poster-for-wp-multiple-accounts"><?php _e('Get', 'social-networks-auto-poster-facebook-twitter-g'); ?> PRO - Multiple Accounts Edition</a><br/><br/> <?php _e('Here you can setup "Social Networks Auto Poster".', 'social-networks-auto-poster-facebook-twitter-g'); ?> <br/> <?php _e('You can start by clicking "Add new account" button and choosing the Social Network you would like to add.', 'social-networks-auto-poster-facebook-twitter-g'); } } ?> <br/> <?php $disabled_functions = @ini_get('disable_functions'); if (!function_exists('curl_init')) { echo "<br/><b style='font-size:16px; color:red;'>Error: No CURL Found</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please install it or contact your hosting company to install it.</i><br/><br/>"; } if (stripos($disabled_functions, 'curl_exec') !== false) { echo "<br/><b style='font-size:16px; color:red;'>curl_exec function is disabled in php.ini</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please enable it or contact your hosting company to enable it.</i><br/><br/>"; } if (!empty($rff) && stripos($rff, "'d code") === false) { $options[chr(75) . $cstIt] = $cstIt; update_option($this->dbOptionsName, $options); $this->nxs_options = $options; } if (!isset($options['skipSSLSec'])) { $err = nxsCheckSSLCurl('https://www.google.com'); if ($err !== false && $err['errNo'] == '60') { $nxs_skipSSLCheck = true; $options['skipSSLSec'] = true; } else { $nxs_skipSSLCheck = false; $options['skipSSLSec'] = false; } update_option($this->dbOptionsName, $options); $this->nxs_options = $options; } /* if ((defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE==true) || (defined('MULTISITE') && MULTISITE==true) ) { echo "<br/><br/><br/><b style=\"font-size:16px; color:red;\">Sorry, we do not support Multiuser Wordpress at this time</b>"; return; } */ ?> <?php if (function_exists('yoast_analytics')) { $plgnsLink = nxs_get_admin_url() . '/plugins.php'; ?> <div class="error" id="message"><p><strong><?php _e('You have Google Analytics Plugin installed and activated.', 'social-networks-auto-poster-facebook-twitter-g'); ?> </strong> <?php _e('This plugin hijacks the authorization workflow.', 'social-networks-auto-poster-facebook-twitter-g'); ?> <?php printf(__('Please temporary <a href="%s">deactivate</a> Google Analytics plugin, do all authorizations and then activate it back.', 'social-networks-auto-poster-facebook-twitter-g'), $plgnsLink); ?> </div> <?php } }
function nxssnap_enqueue_scripts() { wp_enqueue_script('nxssnap-scripts', plugin_dir_url(__FILE__) . 'js/js.js', array('jquery'), NextScripts_SNAP_Version); wp_localize_script('nxssnap-scripts', 'MyAjax', array('ajaxurl' => nxs_get_admin_url('admin-ajax.php'), 'nxsnapWPnonce' => wp_create_nonce('nxsnapWPnonce'))); }