<title>Konfirmasi Request Reward</title>
<?
$warna="red";
	$db->select("username", "banner_kanan", "username='$username' and rpoin3='1'");
	$chkd_user = $db->num_rows();
if ($chkd_user!= "") {
	echo "<H5><center><Font color=$warna>Maaf. Anda Sudah Melakukan Penarikan Reward-3.</center></font>";
    echo "<center><Font color=$warna>Silahkan Tunggu Untuk Reward Berikutnya. <br></center></font></h5>";
} else {
$domain=$db->config("domain");
$db->insert("rpoin3", "", "'', '$kodeord', '$username', 'Reward-3', '$rpoin3', '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-3\n"
				."Bonus : $rpoin3\n"
			
				."Segera lakukan Check up kepada banner_kanan tersebut.";
		$headers = "From: $username<$email>\nX-Sender: $email\n";
		$subject = "[Data Request Reward-3 di $domain]"; 

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

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

?> 