cache_warning_check();
if (is_user_logged_in() && is_admin() ){
if (isset($_POST['update_share-and-follow']) && isset($_POST['cnonce']) ) {
if(! wp_verify_nonce($_POST['cnonce'],'checkcdn')){
wp_die('hacking??');}
foreach($c->_defaults as $key => $value){
// check if key is set
if(isset($_POST[$key])){
// update the options variable
$c->_options[$key] = $_POST[$key];
}
}
update_option($c->_adminOptionsName, $c->_options);
delete_transient($c->_adminOptionsName);
if (function_exists('json_decode')){
$key = '';
if ( !empty($_POST['cdn-key']) && $_POST['cdn-key'] != $c->_options['cdn-key'] ){
delete_transient('cdnsets');
$c->_options['cdn-key'] = $_POST['cdn-key'];
}
if ($c->_options['cdn-key']==''){}
else if (strlen($c->_options['cdn-key']) <> 40){
echo "
It looks like you have put in an incorrect CDN API key. Check if you have put extra spaces in it
";
}
else {
$result = get_transient('cdnsets');
if($this->_options['cdn']['status_txt'] == 'FAIL' || $result === false ){
require_once('RemoteConnector.php');
$url = "http://api.share-and-follow.com/v1/getSets.php?url=".trailingslashit(get_bloginfo('url'))."&challange=".md5(trailingslashit(get_bloginfo('url')).$this->_options['cdn-key']);
$control = new Pos_RemoteConnector($url);
$result = $control->__toString();
if ($result != false){
set_transient('cdnsets',$result,60*60);
}
}
$replies = json_decode($result, true);
if ($replies['status_txt']=='FAIL'){
$c->_options['cdn']['status_txt']='FAIL';
$c->update_plugin_options();
echo "The following error has happened : ".$replies['data']."
";
}
else {
$c->_options['cdn'] = json_decode($result, true); // jason format
$c->_options['cdn']['status_txt']='OK';
$c->update_plugin_options();
}
}
}
?>
showUsSupport(); ?>
_options['cdn']['status_txt']=='FAIL'|| $c->_options['cdn-key'] == '' || (strlen($c->_options['cdn-key'])<>40 ) ){
?>
show_video("http://player.vimeo.com/video/16185599", "325", "580") ?>
show_paypal_subscribe(); ?>
Subscriptions are optional. Subscribing will make your site faster, and give you more icon sets to choose from.
show_video("http://player.vimeo.com/video/15507608", "325", "580") ?>