001.
<?
002.
ob_start();
003.
004.
session_start();
005.
require
(
"connect/connect.php"
);
006.
require
(
"connect/function.php"
);
007.
if
(
$_GET
[
"action"
]==
"confirm"
)
008.
{
009.
010.
$result
=select(
"cusorder"
,
"where 1 and OrderNo='"
.
$_POST
[
"txtOrderNo"
].
"'"
);
011.
$result2
=select(
"member"
,
"where 1 and Name='"
.
$_POST
[
"txtName"
].
"'"
);
012.
if
(
$result
)
013.
{
014.
$_POST
[
"txtOrderNo"
]!=
""
;
015.
echo
"<script language=\"JavaScript\">"
;
016.
echo
"alert('รหัส ORDER ไม่ตรงกัน ');"
;
017.
echo
"</script>"
;
018.
}
019.
else
if
(
$result2
)
020.
{
021.
$_POST
[
"txtName"
]!=
""
;
022.
echo
"<script language=\"JavaScript\">"
;
023.
echo
"alert('Order นี้ไม่ได้ใช้ชื่อนี้');"
;
024.
echo
"</script>"
;
025.
026.
}
027.
else
028.
{
029.
030.
031.
$sql
=
"insert into confirm (OrderNo,Name,Email,TelPhone,Time,Date,Desc) Values ('$_POST[txtOrderNo]','$_POST[txtName]','$_POST[txtEmail]','$_POST[txtTelPhone]','$_POST[txtTime]','$_POST[txtDate]','$_POST[txtDesc]')"
;
032.
$dbquery
= mysql_query(
$sql
);
033.
034.
header(
"location:finish.php"
);
035.
}
036.
037.
}
038.
039.
?>
040.
<!DOCTYPE HTML>
041.
<html>
042.
<head>
043.
<meta charset=
"windows-874"
>
044.
<title>::: NEKKY BURIRAM :::</title>
045.
<link href=
"css/styles.css"
rel=
"stylesheet"
type=
"text/css"
>
046.
</head>
047.
<body bgcolor=
"#bdc7d8"
topmargin=
"0"
>
048.
<?php
require_once
(
'head.html'
); ?>
049.
<table width=
"900"
border=
"0"
align=
"center"
cellpadding=
"1"
cellspacing=
"0"
bgcolor=
"#FFFFFF"
>
050.
<tr>
051.
<td bgcolor=
"#FFFFFF"
> <table width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
052.
053.
<tr>
054.
<td><table width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
bordercolor=
"#f2f2f6"
bgcolor=
"#FFFFFF"
>
055.
<tr>
056.
<td width=
"23%"
valign=
"top"
> <?php
require_once
(
'menuleft.php'
); ?> <br> </td>
057.
<td width=
"54%"
valign=
"top"
>
058.
<table width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
059.
<tr>
060.
<td width=
"500"
height=
"310"
valign=
"top"
>
061.
<table width=
"490"
border=
"0"
>
062.
<tr>
063.
<td><table width=
"478"
height=
"22"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
id=
"Table_01"
>
064.
<tr>
065.
066.
<td width=
"389"
background=
"image/menu02.jpg"
><div align=
"center"
><strong>แจ้งการชำระเงิน</strong><strong></strong></div></td>
067.
068.
</tr>
069.
</table></td>
070.
</tr>
071.
<tr>
072.
<td width=
"378"
><table width=
"100%"
border=
"0"
cellspacing=
"3"
cellpadding=
"3"
>
073.
<tr>
074.
<td width=
"79%"
> <div align=
"center"
>
075.
<script language=
"JavaScript"
>
076.
function
checkvalue()
077.
{
078.
079.
if
(frmMain.txtOrderNo.value ==
""
)
080.
{
081.
alert(
'กรุณากรอก [หมายเลขสั่งซื้อ]'
);
082.
frmMain.txtOrderNo.focus();
083.
return
false;
084.
}
085.
086.
if
(frmMain.txtName.value ==
""
)
087.
{
088.
alert(
'กรุณากรอก [ชื่อของคุณ]'
);
089.
frmMain.txtName.focus();
090.
return
false;
091.
}
092.
093.
if
(frmMain.txtEmail.value ==
""
)
094.
{
095.
alert(
'กรุณากรอก [อีเมล์]'
);
096.
frmMain.txtEmail.focus();
097.
return
false;
098.
}
099.
100.
if
(frmMain.txtTelPhone.value ==
""
)
101.
{
102.
alert(
'กรุณากรอก [หมายเลขโทรศัพท์]'
);
103.
frmMain.txtTelPhone.focus();
104.
return
false;
105.
}
106.
107.
if
(frmMain.txtDate.value ==
""
)
108.
{
109.
alert(
'กรุณากรอก [วันที่]'
);
110.
frmMain.txtDate.focus();
111.
return
false;
112.
}
113.
114.
if
(frmMain.txtTime.value ==
""
)
115.
{
116.
alert(
'กรุณากรอก [เวลา]'
);
117.
frmMain.txtTime.focus();
118.
return
false;
119.
}
120.
121.
if
(frmMain.txtDesc.value ==
""
)
122.
{
123.
alert(
'กรุณากรอก [รายละเอียด]'
);
124.
frmMain.txtDesc.focus();
125.
return
false;
126.
}
127.
128.
129.
}
130.
</script>
131.
<form name=
"frmMain"
method=
"post"
action=
"?action=confirm"
onSubmit=
"return checkvalue();"
>
132.
133.
<table width=
"377"
border=
"0"
>
134.
<tr>
135.
<td width=
"106"
>หมายเลขสั่งซื้อ</td>
136.
<td width=
"255"
><input name=
"txtOrderNo"
type=
"text"
id=
"txtOrderNo"
size=
"40"
class
=
"txtbox"
>
137.
<font color=
"#FF0000"
>*</font></td>
138.
</tr>
139.
<tr>
140.
<td>ชื่อของคุณ</td>
141.
<td><input name=
"txtName"
type=
"text"
id=
"txtName"
class
=
"txtbox"
>
142.
<font color=
"#FF0000"
>*</font></td>
143.
</tr>
144.
<tr>
145.
<td>อีเมล์ของคุณ</td>
146.
<td><input name=
"txtEmail"
type=
"text"
id=
"txtEmail"
class
=
"txtbox"
>
147.
<font color=
"#FF0000"
>*</font></td>
148.
</tr>
149.
<tr>
150.
<td valign=
"top"
>เบอร์โทรศัพท์</td>
151.
<td><input name=
"txtTelPhone"
type=
"text"
id=
"txtTelPhone"
class
=
"txtbox"
>
152.
<font color=
"#FF0000"
>*</font></td>
153.
</tr>
154.
<tr>
155.
<td valign=
"top"
>วันที่ -เวลา</td>
156.
<td><input name=
"txtDate"
type=
"text"
class
=
"txtbox"
id=
"txtDate"
size=
"10"
>
157.
-
158.
<input name=
"txtTime"
type=
"text"
class
=
"txtbox"
id=
"txtTime"
size=
"10"
>
159.
<font color=
"#FF0000"
>*</font></td>
160.
</tr>
161.
<tr>
162.
<td valign=
"top"
>รายละเอียด</td>
163.
<td><textarea name=
"txtDesc"
cols=
"40"
rows=
"8"
class
=
"txtbox"
id=
"txtDesc"
></textarea>
164.
<font color=
"#FF0000"
>*</font></td>
165.
</tr>
166.
<tr>
167.
<td> </td>
168.
<td> </td>
169.
</tr>
170.
<tr>
171.
<td> </td>
172.
<td><input name=
"btnSubmit"
type=
"submit"
id=
"btnSubmit"
value=
"Submit"
class
=
"button"
>
173.
<input name=
"btnReset"
type=
"reset"
id=
"btnReset"
value=
"Reset"
class
=
"button"
></td>
174.
</tr>
175.
</table>
176.
</form>
177.
</div>
178.
<hr width=
"96%"
color=
"#f2f2f6"
>
179.
<hr width=
"96%"
color=
"#f2f2f6"
>
180.
<p><br>
181.
</p></td>
182.
</tr>
183.
</table></td>
184.
</tr>
185.
</table>
186.
<p
class
=
"style59"
> </p>
187.
<p
class
=
"style59"
> </p>
188.
<p
class
=
"style59"
> </p></td>
189.
</tr>
190.
</table></td>
191.
<td width=
"23%"
valign=
"top"
> <?php
require_once
(
'menuright.php'
); ?> </td>
192.
</tr>
193.
<tr>
194.
<td colspan=
"3"
valign=
"top"
>
195.
<?php
require_once
(
'down.php'
); ?>
196.
</td>
197.
</tr>
198.
</table></td>
199.
</tr>
200.
</table></td>
201.
</tr>
202.
</table>
203.
</body>
204.
</html>