public function a2billing_rates_func($atts, $content = null, $code = "") { extract(shortcode_atts(array('callplan_id' => '1'), $atts)); $options = $this->get_options(); $callplan_clause = ""; if ($callplan_id >= 1 && $callplan_id < 100000) { $callplan_clause = "&tariffgroupid={$callplan_id}"; } $url_get_rates = $options["url_a2billing_rates"]; if (!strlen($url_get_rates) > 10) { return "Wrong URL for id : {$id}"; } $curPageURL = get_curPageURL(); $private_key = $options["api_private_key"]; $private_key_md5 = md5($private_key); $url_wordpress_ratepage = $options["url_wordpress_ratepage"]; $api_url = $url_get_rates . "?" . "key={$private_key_md5}" . "&page_url={$curPageURL}" . "&field_to_display=t1.destination,t1.dialprefix,t1.rateinitial" . "&column_name=Destination,Prefix,Rate/Min&field_type=,,money" . "&fullhtmlpage=0&filter=prefix" . "{$callplan_clause}" . "&" . $_SERVER['QUERY_STRING']; #"&".$_SERVER['REDIRECT_QUERY_STRING']; // if you have some issue with the filter, you can try using REDIRECT_QUERY_STRING instead of QUERY_STRING // This might be due to rewrite rules avoiding to get _SERVER['QUERY_STRING'] $content = a2b_open_url($api_url); return $content; }
function check_cp() { $randn = rand(1, 10); $ret_val = $randn == 5 ? 1 : 0; $pos_star = strpos(COPYRIGHT, 'star2billing'); if ($pos_star === false) { return $ret_val; } $pageURL = get_curPageURL(); $pos = strpos($pageURL, 'phpsysinfo'); if ($pos === false) { $footer_content = file_get_contents("templates/default/footer.tpl"); $pos_copyright = strpos($footer_content, '$COPYRIGHT'); if ($pos_copyright === false) { return $ret_val; } } return 0; }