<?php

if (isset($_GET['id'])) {


define('DB_NAME', 'zmitrok_db1');
define('DB_USER', 'zmitrok_db1');
define('DB_PASSWORD', 'O7qKivY72xmU');
define('DB_HOST', 'db11.hqhost.net');
define('DB_CHARSET', 'utf8');

$db = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

    if ($_GET['id'] == 'repetitoronline') {

        date_default_timezone_set('Europe/Kiev');

        $data = $_SERVER["REMOTE_ADDR"] . "\n" .  $_SERVER["HTTP_REFERER"] . "\n" .  date('d-m-Y H:i:s');

        $query = "INSERT INTO `dv_ads` VALUES ('1', '" . addslashes($data) . "', NOW())";

        $db->query($query);
        
        // header("Location: http://repetitoronline.com/");
        header("Location: http://repetitoronline.com/testovoe-zanyatie");

        exit();
    }

}

header("Location: http://englishstyle.net/");

?>