function adshow_display_ad_full_path($ad_path) { if (!adshow_functions_exist()) { return false; } $showads = adshow_show_adverts(); if ($showads !== true) { if (adinj_config_debug_mode()) { echo "<!--ADINJ DEBUG: ad blocked at run time reason={$showads}-->"; } return; } if (file_exists($ad_path)) { $ad = file_get_contents($ad_path); if ($ad === false) { echo "\n<!--ADINJ DEBUG: could not read ad from file: {$ad_path}-->"; } if (stripos($ad_path, 'random_1.txt') > 0) { // TODO something better than this echo adinj_config_add_tags_rnd(adshow_eval_php($ad)); } else { if (stripos($ad_path, 'top_1.txt') > 0) { echo adinj_config_add_tags_top(adshow_eval_php($ad)); } else { if (stripos($ad_path, 'bottom_1.txt') > 0) { echo adinj_config_add_tags_bottom(adshow_eval_php($ad)); } else { echo adshow_eval_php($ad); } } } } else { echo "\n<!--ADINJ DEBUG: ad file does not exist: {$ad_path}.\nIf you have just upgraded you may need to re-save your ads to regenerate the ad files.\n-->"; } }
function adshow_clicked_ad() { if (!adshow_functions_exist()) { return false; } if ($_COOKIE["adlogblocked"] == 1) { if (adinj_config_debug_mode()) { echo "<!--ADINJ DEBUG: blocked because adlogblocked cookie set-->\n"; } return true; } return false; }