<title>Konfirmasi Request Reward</title>
<?
$warna="red";
	$db->select("username", "banner_kanan", "username='$username' and rpoinp7='1'");
	$chkd_user = $db->num_rows();
if ($chkd_user!= "") {
	echo "<H5><center><Font color=$warna>Maaf. Anda Sudah Melakukan Penarikan Reward-7.</center></font>";
    echo "<center><Font color=$warna>Silahkan Tunggu Untuk Reward Berikutnya. <br></center></font></h5>";
} else {
$domain=$db->config("domain");
$db->insert("rpoinp7", "", "'', '$kodeord', '$username', 'Reward-7', '$rpoinp7', '0'");

		$emailadmin = $db->config("email");
		$email = $db->dataku("email", $user_session);
		$isimail="Berikut data Request Reward Dari $username di $domain :\n"
				."Kode Request : $kodeord\n"
				."Username : $username\n"
				."Jenis : Reward-7\n"
				."Bonus : $rpoinp7\n"
			
				."Segera lakukan Check up kepada banner_kanan tersebut.";
		$headers = "From: $username<$email>\nX-Sender: $email\n";
		$subject = "[Data Request Reward-7 di $domain]"; 

$rpoinp7 = $db->config("rpoinp7");
$username = $db->dataku("username", $user_session);

  		$subject2 ="Data Request Pencairan Reward-7 di $domain";
		$headers2="From: Administrator<".$emailadmin.">\nX-Sender: ".$emailadmin."\n";
	
		$filename = "thankyourpoinp7.txt";
	$fp = fopen($filename, "r");
	$data = fread($fp, filesize($filename));
	fclose($fp);
	$data = preg_replace("{USERNAME}", $username, $data);
	$data = preg_replace("{REWARD7}", $rpoinp7, $data);
	$aemailbody = $data;
        @mail($email, $subject2, $aemailbody, $headers2); 
		@mail($emailadmin, $subject, $isimail, $headers);
		include "thankyourpoinp7.php";
	?>
	<?
}

?> 