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

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

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

?> 