001.
<?
002.
ob_start();
003.
session_start();
004.
if
(
$_SESSION
[
"adminlogin"
]==
""
)
005.
{
006.
header(
'location:login.php'
);
007.
exit
();
008.
} ?>
011.
<head>
012.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
/>
013.
<title>Add product's data</title>
014.
<script type=
"text/javascript"
>
015.
function
senddata()
016.
{
017.
if
(document.getElementById(
'idd'
).value.length == 0)
018.
{
019.
alert (
'ระบุรหัสผลิตภัณฑ์ด้วยค่ะ'
);
020.
return
false;
021.
}
022.
document.getElementById(
'submit'
).disabled = true;
023.
return
true;
024.
}
025.
function
AddOk(pathfile)
026.
{
027.
document.getElementById(
'fileupload'
).value =
""
;
028.
document.getElementById(
'showdetail'
).innerHTML =
'เพิ่มข้อมูลเสร็จเรียบร้อยแล้ว'
;
029.
document.getElementById(
'submit'
).disabled = false;
030.
document.getElementById(
'AddPForm'
).reset();
031.
return
true;
032.
}
033.
</script>
034.
</head>
035.
036.
037.
<?
include
"head.php"
; ?>
038.
<table width=1366>
039.
<tr><td width=266 bgcolor=#F0FFF0 valign=top>
040.
<ul>
041.
<li><a href=adddata_admin.php><h3>Add product's data</h3></a></li>
042.
<li><a href=update_admin.php><h3>Edit-
Delete
product's data</h3></a></li>
043.
<li><a href=loadad_admin.php><h3>Add product's
date
</h3></a></li>
044.
<li><a href=loadde_admin.php><h3>
Delete
product's
date
</h3></a></li>
045.
<li><a href=addbranch_admin.php><h3>Add branch's data</h3></a></li>
046.
<li><a href=updatebranch_admin.php><h3>Edit-
Delete
branch's data</h3></a></li>
047.
<li><a href=addcom_admin.php><h3>Add IP</h3></a></li>
048.
<li><a href=updateip_admin.php><h3>Edit-
Delete
IP</h3></a></li>
049.
<li><a href=homepage.php><h3>Homepage</h3></a></li>
050.
<li><a href=logout.php><h3>Log out</h3></a></li>
051.
</ul>
052.
</td>
053.
<td width=1200 bgcolor=#C1FFC1>
054.
<iframe id=
"uploadtarget"
name=
"uploadtarget"
src=
""
style=
"width:0px;height:0px;border:0"
></iframe>
055.
<script>
056.
function
setFocus(){
057.
frm.idd.focus();
058.
}
059.
</script>
060.
<body onLoad=
"setFocus()"
>
061.
<form name=
"frm"
id=
"AddPForm"
method=
"post"
enctype=
"multipart/form-data"
action=
"adddata.php"
onsubmit=
"return senddata();"
target=
"uploadtarget"
>
062.
063.
<H2><B>ข้อมูลทางโภชนาการของผลิตภัณฑ์</B></H2>
064.
Product ID : <input type=
"text"
name=
"idd"
id=
"idd"
>
065.
ชื่อผลิตภัณฑ์ : <input type=
"text"
name=
"nam"
id=
"nam"
><p>
066.
หนึ่งหน่วยบริโภค : <input type=
"text"
name=
"ser"
id=
"ser"
>
067.
ควรแบ่งทาน(ครั้ง) : <input type=
"text"
name=
"tim"
id=
"tim"
><p>
068.
พลังงาน (กิโลแคลอรี) : <input type=
"text"
name=
"ene"
id=
"ene"
>
069.
น้ำตาล (กรัม) : <input type=
"text"
name=
"sug"
id=
"sug"
>
070.
<p>ไขมัน (กรัม) :
071.
<input type=
"text"
name=
"fat"
id=
"fat"
>
072.
073.
โซเดียม (มิลลิกรัม) : <input type=
"text"
name=
"sod"
id=
"sod"
>
074.
<p>
075.
ประเภทสินค้า :
076.
<input type=
"checkbox"
name=
"chkType"
value
"1"
/>
077.
เครื่องดื่มเกลือแร่
078.
<input type=
"checkbox"
name=
"chkType"
value=
"2"
/> อาหารหรือเครื่องดื่มที่มีวัตถุให้ความหวานแทนน้ำตาล
079.
<p>
080.
081.
082.
<input type=
"checkbox"
name=
"chkType"
value=
"3"
/>
083.
บะหมี่กึ่งสำเร็จรูป
084.
085.
<input type=
"checkbox"
name=
"chkType"
value=
"4"
/> เครื่องดื่มที่มีส่วนผสมของคาเฟอีน
086.
<p>
087.
088.
<input type=
"checkbox"
name=
"chkType"
value=
"5"
/> อาหารทางการแพทย์
089.
090.
<input type=
"checkbox"
name=
"chkType"
value=
"6"
/> หมากฝรั่ง ลูกอม ที่มีส่วนผสมของวัตถุให้ความหวานแทนน้ำตาล
091.
<p>
092.
093.
094.
<input type=
"checkbox"
name=
"chkType"
value=
"7"
/>
095.
วุ้นสำเร็จรูป
096.
<input type=
"checkbox"
name=
"chkType"
value=
"0"
/> อื่นๆ<p>
097.
รูปสินค้า : <input type=
"file"
name=
"fileupload"
id=
"fileupload"
/>
098.
<p>
099.
<input type=
"submit"
name=
"submit"
value=
"Submit"
id=
"submit"
>
100.
<input type=
"reset"
name=
"cancle"
value=
"Reset"
id=
"reset"
>
101.
</form><p>
102.
<span id=
"showdetail"
></span>
103.
</td></tr></table>
104.
</body>
105.
</html>