<?php
//AdBlock Detector
$table = $prefix . 'adblocker-settings';
$query = mysqli_query($connect, "SELECT * FROM `$table`");
$row   = mysqli_fetch_assoc($query);

if ($row['detection'] == 1) {

    echo '
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
        
var testAd = document.createElement("div");
testAd.innerHTML = "&nbsp;";
testAd.className = "adsbox";
document.body.appendChild(testAd);
window.setTimeout(function() {
  if (testAd.offsetHeight === 0) {
	window.location = "' . $row['redirect'] . '";
  }
  testAd.remove();
});
		
}, false);

</script>';

}
?>