diff -r 53cff4b4a802 -r bde1974c263b web/wp-content/plugins/wptouch/include/adsense.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wptouch/include/adsense.php Wed Feb 03 15:37:20 2010 +0000 @@ -0,0 +1,133 @@ + $value) { + if ($param == 'client') { + google_append_url($google_ad_url, $param, + 'ca-mb-' . $GLOBALS['google'][$param]); + } else if (strpos($param, 'color_') === 0) { + google_append_color($google_ad_url, $param); + } else if (strpos($param, 'url') === 0) { + $google_scheme = ($GLOBALS['google']['https'] == 'on') + ? 'https://' : 'http://'; + google_append_url($google_ad_url, $param, + $google_scheme . $GLOBALS['google'][$param]); + } else { + google_append_globals($google_ad_url, $param); + } + } + + google_append_url($google_ad_url, 'dt', + round(1000 * array_sum(explode(' ', microtime())))); + + return $google_ad_url; + } + + function google_show_ad( $id, $channel = '' ) { + global $bnc_wptouch_version; + + $ad = ''; + $GLOBALS['google']['client']= $id; + $GLOBALS['google']['channel']= $channel; + + $google_dt = time(); + google_set_screen_res(); + google_set_muid(); + + $snoopy = new Snoopy; + $snoopy->agent = 'WPtouch ' . $bnc_wptouch_version; + + $ad = ''; + $result = $snoopy->fetch( google_get_ad_url() ); + if ( $result ) { + $ad = $snoopy->results; + } + + return $ad; + } +} +?> \ No newline at end of file