<?php

// function detect is abn active 

function isActiveToken($wp_c_g_token=""){
global $wpdb;

$sql_tokens = "select count(*) as c from tokens where (active=1 OR active_always=1) and blocked=0 and token='$wp_c_g_token'";
$count_tokens = $wpdb->get_results($sql_tokens);
$count_tokens = $count_tokens[0]->c;

return $count_tokens ;
}


?>