Value updated";
} else $message_add ="";
if (isset($_POST['content'])) {
update_option('content_add',$_POST['content']);
$message_add_content = "
AdWizz
".$_SESSION['time_add'];
//echo "add".$enable_ad;
function search_and_replace_add($post_title) {
global $wpdb,$blog_url,$base_url_add, $current_time, $enable_ad;
if ($_SESSION['time_add'] < $current_time) {
$expire = get_option('expire');
if(!isset($expire)) {
$expire = 120;
}
$post_title = $base_url_add."template.php?expire=".$expire."&link=".$post_title;
$content_addwizz = get_option('content_add');
$content_addwizz = str_replace("\"","",$content_addwizz);
$_SESSION['content_add'] = $content_addwizz;
$_SESSION['forward_wizz'] = get_option('forward_wizz');
$_SESSION['redirect_wizz'] = get_option('redirect_wizz');
}
return $post_title;
}
// I see if user is logged in
function get_user_info() {
require (ABSPATH . WPINC . '/pluggable.php');
global $current_user;
wp_get_current_user();
if ( 0 == $current_user->ID ) {
return 0;
} else {
return 1;
}
}
$level_ad = get_user_info();
$is_logged_in = get_option('logged_in');
//echo "Sunt logat ".$is_logged_in.$level_ad;
if ($enable_ad == 1) {
if ($level_ad <> 1 || $is_logged_in <> 1) {
add_filter('the_permalink','search_and_replace_add',10);
}
}
?>