/* Config Part --------------------------------------------------------------------------------------------------------------*/ $directory = "/var/www/vhosts/pirana.nydhosting.com/httpdocs/PAGINA1/banner/"; // Webserver path to your adrotator files $linkfile = "linkcode.inc"; // The Link Code file $adcountfile = "displayad.inc"; // The Ad Display file $pos = "center"; // Postion of banner tag (left, center or right) $help_msg = "no"; // Display a "Help Message" - "Yes" to enable! $help_message = "Please support this site by clicking on the banner below"; // Enter "Help Message" here /* End of Config Part -------------------------------------------------------------------------------------------------------*/ // Leave below this line alone - If you modify anything below I can assure you it will mess up! // the file holding the advert number to view next $num = file($directory.$adcountfile); // the file holding the link codes $adverts = file($directory.$linkfile); // tells the script to look at the next item in the array $num = $num[0]+1; // counting the number of adverts - using function count() $number = count($adverts); // If ran out of adverts, start again! if($num>$number-1){ $num=0; } // write the current number to the file if (file_exists($directory.$adcountfile)) { $nu = fopen ($directory.$adcountfile, "w"); fputs($nu,$num); } else { die(" Can't find fileCheck ad-count file ($adcountfile) exists Check file with links ($linkfile) exists Check directory ($directory) is correct"); } // display the link on the page if($help_msg == "yes"){ echo "{$pos_statag}$help_message{$pos_endtag}"; } echo " $adverts[$num] ";
?>
|
GENTE EN LINEA USUARIOS ACTIVOS |