executeQuery("INSERT INTO adslog SET `date` = DATE(NOW()), `amount` = 1, `type` = 'videostrip' ON DUPLICATE KEY UPDATE amount = amount+1"); } $iThiscounter = $iThiscounter+1; setcookie('icounter',$iThiscounter,time()+3600,'/'); //Create new template $oTpl = new Site_Tpl('player/iframe.tpl'); $browser = get_browser(null, true); if($browser['browser'] == 'IE'){ //$bShowVideoStrip = 0; //setcookie('iStripShown', 1, time() - 3600, '/'); } if($bShowVideoStrip){ $username = "viperbv"; $password = "fusion"; $timestamp = round(microtime(true) * 1000); $timestamp = substr(sprintf('%f$1', $timestamp),0,13); $hash = md5(md5($password).$timestamp); $url = "https://n184.epom.com/rest-api/advertiser/2/campaigns.do"; $post_data = array( "hash" => $hash, "timestamp" => $timestamp, "username" => $username ); $options = array( CURLOPT_URL => $url."?".http_build_query($post_data), CURLOPT_SSL_VERIFYPEER => false, CURLOPT_RETURNTRANSFER => true ); $curl = curl_init(); curl_setopt_array($curl,$options); $result=curl_exec($curl); $poe = json_decode($result); if(!$poe[0]->active){ $bShowVideoStrip=false; setcookie('iStripShown', 1, time() - 3600, '/'); } } //Some variables $oTpl->setGlobals(array( 'sFile' => $_GET['file'], 'bShowVideoStrip' => isset($bShowVideoStrip) && $bShowVideoStrip, 'bShowInvideo' => !isset($_COOKIE['iStripShown']), 'DEBUG' => ($_SERVER['REMOTE_ADDR'] == "62.212.71.77") )); //Parse the template die($oTpl->parse()); ?>