001.
<?php
002.
session_start();
003.
?>
004.
005.
<?php
include
(
"include/convertmoney_inc.php"
); ?>
006.
<?
include
"Connections/connect.php"
; ?>
007.
<?php
008.
009.
$to
=
'jittipong_m@hotmail.com'
.
', '
;
010.
$to
.=
'jittipong.m@gmail.com'
;
011.
012.
013.
$subject
=
'ท่านได้สั่งซื้อสินค้าจาก SPEEDACCOUNT.COM'
;
014.
$subject
=
"=?UTF-8?B?"
.
base64_encode
(
$subject
).
"?="
;
015.
016.
$message
= '
017.
<html>
018.
<head>
019.
<title>หนังสือบัญชี,คู่มือเตรียมสอบ,เตรียมสอบบัญชี,เตรียมสอบta,เตรียมสอบcpa,คู่มือเตรียมสอบTA,คู่มือสอบเข้าราชการ,คู่มือเตรียมสอบCPA,ชีทเตรียมสอบ,DVDวิชาบัญชี,DVDสอบTA,Speedaccount.com</title>
020.
</head>
021.
<body>
022.
<p><font color=
"blue"
><strong>คุณได้สั่งซื้อของจากทาง Speedaccount.com มีรายละเอียดดังนี้</strong></font></p>
023.
<table border=
"1"
width=
"600"
cellspacing=
"0"
cellpadding=
"0"
>
024.
<tr>
025.
<th colspan=
"5"
align=
"left"
bgcolor=
"#0066FF"
><font color=
"#FFFFFF"
>เลขที่ใบสั่งซื้อ: 00111</font></th>
026.
</tr>
027.
<tr>
028.
<th bgcolor=
"#D3EBE8"
>รหัสสินค้า</th>
029.
<th bgcolor=
"#D3EBE8"
>ชื้อสินค้า</th>
030.
<th bgcolor=
"#D3EBE8"
>ราคาต่อหน่วย</th>
031.
<th bgcolor=
"#D3EBE8"
>จำนวนสั่งซื้อ</th>
032.
<th bgcolor=
"#D3EBE8"
>รวม</th>
033.
</tr>
034.
<?
035.
036.
function
idpro(
$a
){
037.
include
"Connections/connect.php"
;
038.
$sql
=
"select * from product where id=$a "
;
039.
$result
=mysql_db_query(
$dbname
,
$sql
);
040.
$data
=mysql_fetch_array(
$result
);
041.
$idproduct
=
$data
[idproduct];
042.
return
$idproduct
;
043.
}
044.
045.
for
(
$i
=0;
$i
<
count
(
$sess_id
) ;
$i
++){
046.
$idproduct
=
$data
[idproduct];
047.
$total_unit
=
$sess_num
[
$i
] *
$sess_price
[
$i
];
048.
$total
=
$total
+
$total_unit
;
049.
$code
=sprintf(
"%05d"
,
$sess_id
[
$i
]);
050.
$idproduct
=idpro(
$sess_id
[
$i
]);
051.
052.
?>
053.
<tr>
054.
<td><?
echo
$idproduct
?></td>
055.
<td><div align=
"center"
><?
echo
$sess_name
[
$i
]?></div></td>
056.
<td><div align=
"right"
><?
echo
$sess_num
[
$i
]?></div></td>
057.
<td><div align=
"right"
><?
echo
$sess_price
[
$i
] ?></div></td>
058.
<td><div align=
"right"
><?
echo
$total_unit
?></div></td>
059.
</tr>
060.
<?
061.
}
062.
?>
063.
064.
<tr align=
"center"
>
065.
<td colspan=
"4"
>ค่าจัดส่ง</td>
066.
<td><?
$a
=50;
echo
$a
; ?></td>
067.
</tr>
068.
<tr align=
"center"
>
069.
<td colspan=
"4"
>ราคารวมทั้งหมด </td>
070.
<td bgcolor=
"#FFFF99"
><font color=
"red"
><strong><?
echo
"$total"
; ?></strong></font> ฿</td>
071.
</tr>
072.
</table><br/>
073.
<font color=
"blue"
> <strong>กรุณาชำระค้าสินค้าโดยการโอนเงินตามหมายเลขบัญชีดังนี้</strong></font><br/><br/>
075.
077.
078.
<br/><br/>
079.
080.
******************หากท่านชำระสินค้าแล้วกรุณาทำการยืนยันตามลิงค์นี้ <a href=
"http://www.google.co.th/"
>ยืนยันการชำระเงิน</a>******************<br/>
081.
<font color=
"red"
><strong>หากมีปัญหาในการชำระเงินหรือการยืนยันการชำระเงินติดต่อได้ที่
082.
<br/></strong></font>Tel:089-673-2136
083.
<br/>E-mail: <a href=
"mailto:webmaster@speedaccount.com"
>webmaster@speedaccount.com</a><br/><br/><br/>
084.
<p align=
"center"
><font color=
"red"
><strong>ทางเราจะจัดส่งสินค้าให้ทันทีที่ตรวจสอบข้อมูลเรียบร้อย</strong></font></p>
085.
<br/> <font color=
"blue"
> <strong> ขอบคุณที่ใช้บริการ</strong></font><br/>
086.
<strong> <a href=
"www.Speedaccount.com"
>www.Speedaccount.com</a> </strong><br/>
088.
<hr>
089.
090.
<p align=
"center"
><strong> จำหน่าย </strong><br/>
091.
หนังสือบัญชี,คู่มือเตรียมสอบ,เตรียมสอบบัญชี,เตรียมสอบta,เตรียมสอบcpa,คู่มือเตรียมสอบTA,<br/>คู่มือสอบเข้าราชการ,คู่มือเตรียมสอบCPA,ชีทเตรียมสอบ,DVDวิชาบัญชี,DVDสอบTA
092.
</p>
093.
094.
</body>
095.
</html>
096.
';
097.
098.
099.
$headers
=
'MIME-Version: 1.0'
.
"\r\n"
;
100.
101.
$headers
.=
'Content-type: text/html; charset=UTF-8'
.
"\r\n"
;
102.
103.
104.
$headers
.=
'From: Speedaccount.com <Webmaster@speedaccount.com>'
.
"\r\n"
;
105.
106.
107.
108.
109.
if
(mail(
$to
,
$subject
,
$message
,
$headers
)){
110.
echo
"Sendmail Complease<br/>"
;
111.
echo
"<a href='index.php'>home</a>"
;
112.
}
else
{
113.
echo
"Cannot Send mail</br>"
;
114.
echo
"<a href='index.php'>home</a>"
;
115.
}
116.
?>