Вход Регистрация
Файл: AntiAdblock/aa.php
Строк: 370
<?php
ini_set
('error_reporting'E_ALL);

include 
'config.php';
?>
<html>
    <head>
        <script type='text/javascript' src='data:text/javascript;base64,dmFyIFRlc3RMaWIgPSB7IH07DQoNCiR3aWR0aCA9ICQod2luZG93KS53aWR0aCgpOw0KDQpmdW5jdGlvbiBhbmltYXRlUG9wdXAoKXsNCiAgICAkKCIjcG9wdXAiKS5hbmltYXRlKHsNCiAgICAgICAgd2lkdGg6ICR3aWR0aCArICdweCcsDQogICAgICAgIGxlZnQ6JzFweCcsDQogICAgfSwgNTAwKTsNCn0NCg0KJCggd2luZG93ICkucmVzaXplKGZ1bmN0aW9uKCkgew0KICAgICQoIiNwb3B1cCIpLmNzcygid2lkdGgiLCAiMTAwJSIpOw0KfSk7DQoNCiQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uKCl7DQogICAgaWYoJC5icm93c2VyLmNocm9tZSkgew0KICAgICAgICB2YXIgZW5hYmxlZCA9IHRydWU7DQogICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsNCiAgICAgICAgICAgIGlmKCQoIiNhYS10ZXN0IikuY3NzKCJkaXNwbGF5IikgIT0gIm5vbmUiKXsNCiAgICAgICAgICAgICAgICBlbmFibGVkID0gZmFsc2U7DQogICAgICAgICAgICAgICAgJCgiI292ZXJsYXkiKS5yZW1vdmUoKTsNCiAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICQoIiNvdmVybGF5IikuY3NzKCJkaXNwbGF5IiwgImJsb2NrIik7DQogICAgICAgICAgICAgICAgYW5pbWF0ZVBvcHVwKCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICAkKCIjYWEtdGVzdCIpLnJlbW92ZSgpOw0KICAgICAgICB9LCAxMDAwKTsNCiAgICB9IGVsc2UgaWYgKCQuYnJvd3Nlci5tb3ppbGxhKSB7DQogICAgICAgIHZhciBzaXplID0gJCgiI2FhLXRlc3QiKS53aWR0aCgpOw0KICAgICAgICAkKCIjYWEtdGVzdCIpLnJlbW92ZSgpOw0KICAgICAgICANCiAgICAgICAgaWYoc2l6ZSA9PT0gMCl7DQogICAgICAgICAgICAkKCIjb3ZlcmxheSIpLmNzcygiZGlzcGxheSIsICJibG9jayIpOw0KICAgICAgICAgICAgYW5pbWF0ZVBvcHVwKCk7DQogICAgICAgIH1lbHNlew0KICAgICAgICAgICAgJCgiI292ZXJsYXkiKS5yZW1vdmUoKTsNCiAgICAgICAgfQ0KICAgIH0gZWxzZSBpZiAoJC5icm93c2VyLm1zaWUpIHsNCiAgICAgICAgLyogSW50ZXJuZXQgRXhwbG9yZXIgbm90IHN1cHBvcnRlZCB5ZXQhICovDQogICAgfSBlbHNlIGlmKCQuYnJvd3Nlci5zYWZhcmkpIHsNCiAgICAgICAgdmFyIGVuYWJsZWQgPSB0cnVlOw0KICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7DQogICAgICAgICAgICBpZigkKCIjYWEtdGVzdCIpLmNzcygiZGlzcGxheSIpICE9ICJub25lIil7DQogICAgICAgICAgICAgICAgZW5hYmxlZCA9IGZhbHNlOw0KICAgICAgICAgICAgICAgICQoIiNvdmVybGF5IikucmVtb3ZlKCk7DQogICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAkKCIjb3ZlcmxheSIpLmNzcygiZGlzcGxheSIsICJibG9jayIpOw0KICAgICAgICAgICAgICAgIGFuaW1hdGVQb3B1cCgpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJCgiI2FhLXRlc3QiKS5yZW1vdmUoKTsNCiAgICAgICAgfSwgMTAwMCk7DQogICAgfSBlbHNlIHsNCiAgICAgICAgJCgiI292ZXJsYXkiKS5yZW1vdmUoKTsNCiAgICB9DQogICAgDQogICAgJCgiI2xvYWQiKS5jbGljayhmdW5jdGlvbigpIHsNCiAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7DQogICAgfSk7DQp9KTs='></script>
        <script type='text/javascript' src='data:text/javascript;base64,dmFyIFRlc3RMaWIgPSB7IH07DQoNCiR3aWR0aCA9ICQod2luZG93KS53aWR0aCgpOw0KDQpmdW5jdGlvbiBhbmltYXRlUG9wdXAoKXsNCiAgICAkKCIjcG9wdXAiKS5hbmltYXRlKHsNCiAgICAgICAgd2lkdGg6ICR3aWR0aCArICdweCcsDQogICAgICAgIGxlZnQ6JzFweCcsDQogICAgfSwgNTAwKTsNCn0NCmZ1bmN0aW9uIHBvc3RWaXNpdCgpew0KICAgICQuZ2V0KCIvQW50aUFkYmxvY2svbXNxbC5waHAiLCBmdW5jdGlvbihkYXRhKSB7fSk7DQp9DQoNCiQoIHdpbmRvdyApLnJlc2l6ZShmdW5jdGlvbigpIHsNCiAgICAkKCIjcG9wdXAiKS5jc3MoIndpZHRoIiwgIjEwMCUiKTsNCn0pOw0KDQokKGRvY3VtZW50KS5yZWFkeShmdW5jdGlvbigpew0KICAgIGlmKCQuYnJvd3Nlci5jaHJvbWUpIHsNCiAgICAgICAgdmFyIGVuYWJsZWQgPSB0cnVlOw0KICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7DQogICAgICAgICAgICBpZigkKCIjYWEtdGVzdCIpLmNzcygiZGlzcGxheSIpICE9ICJub25lIil7DQogICAgICAgICAgICAgICAgZW5hYmxlZCA9IGZhbHNlOw0KICAgICAgICAgICAgICAgICQoIiNvdmVybGF5IikucmVtb3ZlKCk7DQogICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICBwb3N0VmlzaXQoKTsNCiAgICAgICAgICAgICAgICAkKCIjb3ZlcmxheSIpLmNzcygiZGlzcGxheSIsICJibG9jayIpOw0KICAgICAgICAgICAgICAgIGFuaW1hdGVQb3B1cCgpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJCgiI2FhLXRlc3QiKS5yZW1vdmUoKTsNCiAgICAgICAgfSwgMTAwMCk7DQogICAgfSBlbHNlIGlmICgkLmJyb3dzZXIubW96aWxsYSkgew0KICAgICAgICB2YXIgc2l6ZSA9ICQoIiNhYS10ZXN0Iikud2lkdGgoKTsNCiAgICAgICAgJCgiI2FhLXRlc3QiKS5yZW1vdmUoKTsNCiAgICAgICAgDQogICAgICAgIGlmKHNpemUgPT09IDApew0KICAgICAgICAgICAgcG9zdFZpc2l0KCk7DQogICAgICAgICAgICAkKCIjb3ZlcmxheSIpLmNzcygiZGlzcGxheSIsICJibG9jayIpOw0KICAgICAgICAgICAgYW5pbWF0ZVBvcHVwKCk7DQogICAgICAgIH1lbHNlew0KICAgICAgICAgICAgJCgiI292ZXJsYXkiKS5yZW1vdmUoKTsNCiAgICAgICAgfQ0KICAgIH0gZWxzZSBpZiAoJC5icm93c2VyLm1zaWUpIHsNCiAgICAgICAgLyogSW50ZXJuZXQgRXhwbG9yZXIgbm90IHN1cHBvcnRlZCB5ZXQhICovDQogICAgfSBlbHNlIGlmKCQuYnJvd3Nlci5zYWZhcmkpIHsNCiAgICAgICAgdmFyIGVuYWJsZWQgPSB0cnVlOw0KICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7DQogICAgICAgICAgICBpZigkKCIjYWEtdGVzdCIpLmNzcygiZGlzcGxheSIpICE9ICJub25lIil7DQogICAgICAgICAgICAgICAgZW5hYmxlZCA9IGZhbHNlOw0KICAgICAgICAgICAgICAgICQoIiNvdmVybGF5IikucmVtb3ZlKCk7DQogICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICBwb3N0VmlzaXQoKTsNCiAgICAgICAgICAgICAgICAkKCIjb3ZlcmxheSIpLmNzcygiZGlzcGxheSIsICJibG9jayIpOw0KICAgICAgICAgICAgICAgIGFuaW1hdGVQb3B1cCgpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJCgiI2FhLXRlc3QiKS5yZW1vdmUoKTsNCiAgICAgICAgfSwgMTAwMCk7DQogICAgfSBlbHNlIHsNCiAgICAgICAgJCgiI292ZXJsYXkiKS5yZW1vdmUoKTsNCiAg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ICkgew0KCQkJCQlqUXVlcnkuZXZlbnQuYWRkKCBkb2N1bWVudCwgbmFtZSArICIuIiArIGpRdWVyeS5ndWlkLCBmdW5jdGlvbigpIHsNCgkJCQkJCWpRdWVyeS5ldmVudC50cmlnZ2VyKCBuYW1lLCBudWxsLCBlbGVtLCB0cnVlICk7DQoJCQkJCX0pOw0KCQkJCQlqUXVlcnkuX2RhdGEoIHRoaXMsIG5hbWUsIGpRdWVyeS5ndWlkKysgKTsNCgkJCQl9DQoJCQkJcmV0dXJuIGZhbHNlOw0KCQkJfSwNCgkJCXRlYXJkb3duOiBmdW5jdGlvbigpIHsNCgkJCQlpZiAoIHRoaXMgIT09IGRvY3VtZW50ICkgew0KCQkJCQlqUXVlcnkuZXZlbnQucmVtb3ZlKCBkb2N1bWVudCwgbmFtZSArICIuIiArIGpRdWVyeS5fZGF0YSggdGhpcywgbmFtZSApICk7DQoJCQkJfQ0KCQkJCXJldHVybiBmYWxzZTsNCgkJCX0NCgkJfTsNCgl9DQopOw0KDQoNCn0pKCBqUXVlcnksIHdpbmRvdyApOw0K'></script>
        <link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
        <link href='data:text/css;base64,I2FhLXRlc3R7DQogICAgcG9zaXRpb246YWJzb2x1dGU7DQogICAgdG9wOi01MDBweDsNCiAgICBsZWZ0OiAtNTAwcHg7DQp9DQojb3ZlcmxheSB7DQogICAgZGlzcGxheTpub25lOw0KICAgIHBvc2l0aW9uOiBmaXhlZDsNCiAgICB6LWluZGV4OiA5OTk5Ow0KICAgIHdpZHRoOiAxMDAlOw0KICAgIGhlaWdodDogMTAwJTsNCiAgICB0b3A6IDA7DQogICAgbGVmdDogMDsNCiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDAsMCwwLDAuNDkpOw0KfQ0KI3BvcHVwLXRleHQgew0KICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsNCiAgICBmb250LWZhbWlseTogJ1JvYm90bycsIHNhbnMtc2VyaWY7DQogICAgY29sb3I6IHdoaXRlOw0KICAgIHdpZHRoOiA5MDBweDsNCiAgICBoZWlnaHQ6IDIwMHB4Ow0KICAgIHRvcDogNTAlOw0KICAgIGxlZnQ6IDUwJTsJDQogICAgbWFyZ2luLWxlZnQ6IC00NTBweDsNCiAgICBtYXJnaW4tdG9wIDotMTAwcHg7DQp9DQojcG9wdXAtdGV4dCBoMSB7DQogICAgZm9udC1zaXplOiAzMHB4Ow0KICAgIG1hcmdpbi10b3A6IDIwcHg7DQogICAgbWFyZ2luLWxlZnQ6IDBweDsNCn0NCiNwb3B1cC10ZXh0IGgyIHsNCiAgICBmb250LXNpemU6IDE1cHg7DQogICAgbWFyZ2luLXRvcDogMHB4Ow0KICAgIG1hcmdpbi1sZWZ0OiAwcHg7DQp9DQojcG9wdXAtdGV4dCBidXR0b24gew0KICAgIGZvbnQtZmFtaWx5OiAnUm9ib3RvJywgc2Fucy1zZXJpZjsNCiAgICBmb250LXdlaWdodDogYm9sZDsNCiAgICBmb250LXNpemU6IDE3cHg7DQogICAgYm9yZGVyOiAzcHggc29saWQgd2hpdGU7DQogICAgY29sb3I6IHdoaXRlOw0KICAgIGJhY2tncm91bmQtY29sb3I6ICNmZjAwNDg7DQp9DQojcG9wdXAgew0KICAgIHBvc2l0aW9uOiBmaXhlZDsNCiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmYwMDQ4Ow0KICAgIHdpZHRoOiAycHg7DQogICAgaGVpZ2h0OiAyMDBweDsNCiAgICBsZWZ0OiA1MCU7DQogICAgdG9wOiA1MCU7DQogICAgbWFyZ2luLXRvcDogLTEwMHB4Ow0KICAgIG1hcmdpbi1sZWZ0OiAtMTsNCn0=' rel='stylesheet' type='text/css'>
    </head>
    <body>
        <?php if ($overlay_enabled) : ?>
        <iframe id="aa-test" src="http://tags.qservz.com"></iframe>
        <div id="overlay">
            <div id="popup">
                <div id="popup-text">
                    <h1>Please disable your Adblock!</h1>
                    <h2>We detected that you are using Adblock. You need to deactivate it in order to use this website.</h2>
                    <button id="load">Reload</button>
                </div>
            </div>
        </div>
        <?php endif; ?>
    </body>
</html>
Онлайн: 1
Реклама