<?php
include ("vendor/autoload.php");
	
$config = new Config;
$func = new Func;
$db = new Db($config->HostDB, $config->UserDB, $config->PassDB, $config->BaseDB);
$bonus_min = 10;
$bonus_max = 100;

/* $db->Query("SELECT id,email FROM db_users_aaa where id > 5547 ");
                    if($db->NumRows() > 0){
                        
                        while($data = $db->FetchArray()){
						echo $data["email"]."<br>";
						//$seconds=random_int(10,50);
						//sleep($seconds);
						mail($data["email"], "Bitcoin Cash","Hello, Make BCH with this innovative game Cash Empire https://bit.ly/3dNgn2X");	
						//	echo $data["id"]."<br>";
						}
					} */
//$db->Query("DELETE FROM db_selling WHERE bot = 1");

//mail("aminesmaouidev@gmail.com", "Bitcoin Cash","Hello, Make BCH with this innovative game Cash Empire https://bit.ly/3dNgn2X");	


$avatarlist=array("778793977.jpg", "859106122.jpg", "878652928.jpg","962402340.jpg","975040589.jpg","ava_elven4.jpg","ava_elven13.jpg","ava_elven15.jpg");
$metallist=array("gold","silver","silver","silver");
$userlist=array("pikos", "smarov", "walid","vivonas","bbjack","jimols","keskesfam","brahimodak","rahma33","zagazjm","barko77","ahmedm","bestgam66","juir55","ren33","massiv","med111","choco","kingof","jacksonw","smiritf","euro2025","goldenc","bzalox","7money","karim","mike22");
$quantity=random_int(10,500);
$price=($quantity*0.001)/1000 ;
$uname=$userlist[array_rand($userlist, 1)] ;

$avatar=$avatarlist[array_rand($avatarlist, 1)] ;
$metal=$metallist[array_rand($metallist, 1)] ;

$ddel = time() + 60*60*24;
$dadd = time()-3600 ;
$sum = mt_rand($bonus_min*10,mt_rand($bonus_min*10,$bonus_max*10))/10;

//$db->Query("INSERT INTO db_bonus_list (user, user_id, sum, metal,date_add, date_del) VALUES ('$uname',2,'$sum','$metal','$dadd','$ddel')");

$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname','$avatar','$metal','$quantity','$price',1)");


$quantity=random_int(3000,9000);
$price=($quantity*0.001)/1000 ;
$uname1=$userlist[array_rand($userlist, 1)] ;

while ($uname1==$uname) {
	$uname1=$userlist[array_rand($userlist, 1)] ;
}

$avatar1=$avatarlist[array_rand($avatarlist, 1)] ;
$metal=$metallist[array_rand($metallist, 1)] ;

$ddel = time() + 60*60*24;
$dadd = time()-5600 ;
$sum = mt_rand($bonus_min*10,mt_rand($bonus_min*10,$bonus_max*10))/10;

//$db->Query("INSERT INTO db_bonus_list (user, user_id, sum, metal,date_add, date_del) VALUES ('$uname1',2,'$sum','$metal','$dadd','$ddel')");


$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname1','$avatar1','$metal','$quantity','$price',1)");


$quantity=random_int(1000,5000);
$quantity1=$quantity+18;
$price=($quantity*0.001)/1000 ;

$uname2=$userlist[array_rand($userlist, 1)] ;

while (($uname2==$uname) ||($uname2==$uname1) )  {
	$uname2=$userlist[array_rand($userlist, 1)] ;
}

$avatar2=$avatarlist[array_rand($avatarlist, 1)] ;
$metal=$metallist[array_rand($metallist, 1)] ;
$ddel = time() + 60*60*24;
$dadd = time()-1800 ;
$sum = mt_rand($bonus_min*10,mt_rand($bonus_min*10,$bonus_max*10))/10;

//$db->Query("INSERT INTO db_bonus_list (user, user_id, sum, metal,date_add, date_del) VALUES ('$uname2',2,'$sum','$metal','$dadd','$ddel')");

$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname2','$avatar2','$metal','$quantity','$price',1)");
$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname','$avatar1','silver','$quantity+10','$price',1)");

$quantity=random_int(500,5000);
$quantity1=$quantity-111 ;
$price=($quantity*0.001)/1000 ;
$uname3=$userlist[array_rand($userlist, 1)] ;
while (($uname3==$uname)|| ($uname3==$uname1) || ($uname3==$uname2) )  {
	$uname3=$userlist[array_rand($userlist, 1)] ;
}

$avatar3=$avatarlist[array_rand($avatarlist, 1)] ;
$metal=$metallist[array_rand($metallist, 1)] ;
$ddel = time() + 60*60*24;
$dadd = time()-600 ;
$sum = mt_rand($bonus_min*10,mt_rand($bonus_min*10,$bonus_max*10))/10;

//$db->Query("INSERT INTO db_bonus_list (user, user_id, sum, metal,date_add, date_del) VALUES ('$uname3',2,'$sum','$metal','$dadd','$ddel')");

$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname3','$avatar3','silver','$quantity','$price',1)");
$db->Query("INSERT INTO db_selling (seller, avatar,metal, quantity, price,bot) VALUES ('$uname1','$avatar1','silver','$quantity1','$price',1)");




?>