//include ('../utc/utc_dbconnect.php'); //include $_SERVER['DOCUMENT_ROOT']."/utc_dbconnect.php"; //include "/var/www/vhosts/uptheclarets.com/httpdocs/utc/utc_dbconnect.php"; //include "http://localhost/httpdocs/utc/utc_dbconnect.php"; //include "./utc/utc_dbconnect.php"; //require "utc_dbconnect.php"; $dir = dirname(__FILE__); include($dir.'/utc_dbconnect.php'); //include_path = '/var/www/vhosts/uptheclarets.com/httpdocs/utc'; //require 'utc_dbconnect.php'; $banner=$_GET['b']; dbconnect(); $ad_sql_text = "select ad_id,ad_text from utc_schedule where ad_key in (select min(ad_key) from utc_schedule where active=1 and banner_id=".$banner.")"; if ($result = mysqli_query($db,$ad_sql_text)) { while ($row = mysqli_fetch_row($result)) { $ad_id = $row[0]; $ad_text = $row[1]; } /* free result set */ mysqli_free_result($result); $plus1_text="update utc_schedule set ad_key=ad_key+1 where ad_id=".$ad_id ; $plus1_result = mysqli_query($db,$plus1_text); $today = date("Ymd"); $plusv_text="update utc_stats set views=views+1 where ad_id=".$ad_id." and date_stamp=".$today ; $plusv_result = mysqli_query($db,$plusv_text); } else { $ad_text = "
Error serving banner ".$banner." : ". $ad_sql_text."
"; } echo ' ' ; echo $ad_text; echo ''; mysqli_close(); ?>