<?

//*********************************************************************************

// Original Website By : Niadesain.com Di Jual melalui http://niadesain.com

// Please Call / SMS : 081384745483 (support@niadesain.com)

// Niadesain.com - Jasa Pembuatan Website Paling Murah dan Paling Lengkap

//*********************************************************************************

?>

<title>Konfirmasi Pendaftaran Stockist</title>

<?

$domain=$db->config("domain");

$by=$db->config("biaya");

$hargax=$by*$kartu;
$hargaxx=($hargax*$db->config("potstok"))/100;
$hargaxxx=$hargax - $hargaxx;

$db->insert("menu", "", "'', '$kodeord', '$username', '$nama', '$email', '$alamat', '$kota', '$propinsi', '$kodepos',  '$hp', '$kartu', '$clientdate', '','1','$hargax','$hargaxxx','$pakej','0','0'");



		$emailadmin = $db->config("email");

		$isimail="Berikut data Order Kartu AKtivasi dari Stockist $username di $domain :\n"

				."User ID : $username\n"

				."Password : $password2\n"

				."Nama : $nama\n"

				."Alamat : $alamat\n"

				."Kota : $kota\n"

				."Propinsi : $propinsi\n"

				."No. HP : $hp\n"

				."E-mail : $email\n"

				."Banyaknya Order : $kartu\n"

				."Biaya : ".rupiah($harga)."\n"

				."Tanggal Daftar : $clientdate\n\n"

			

				."Segera lakukan follow up kepada member tersebut.";

		$headers = "From: $nama<$email>\nX-Sender: $email\n";

		$subject = "[Data Order Kartu Aktivasi Anda di $domain] - New Order"; 



  		$subject2 ="Data Order Kartu AKtivasi Anda di $domain";

		$headers2="From: Administrator<".$emailadmin.">\nX-Sender: ".$emailadmin."\n";
		
		$duit = rupiah($harga);

	

		$filename = "thankyouord.txt";

	$fp = fopen($filename, "r");

	$data = fread($fp, filesize($filename));
	

	fclose($fp);

	$data = preg_replace("{USERNAME}", $username, $data);

	$data = preg_replace("{PASSWORD}", $password2, $data);

	$data = preg_replace("{KOTA}", $kota, $data);

	$data = preg_replace("{PROPINSI}", $propinsi, $data);

	$data = preg_replace("{HP}", $hp, $data);

	$data = preg_replace("{NAMA}", $nama, $data);

	$data = preg_replace("{KARTU}", $kartu, $data);

	$data = preg_replace("{HARGA}", $duit, $data);

	$aemailbody = $data;

        @mail($email, $subject2, $aemailbody, $headers2); 

		@mail($emailadmin, $subject, $isimail, $headers);

		include "thankyouord.php";

	?>