003.
<head>
004.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
005.
<title>EPR</title>
006.
007.
<style type=
"text/css"
>
008.
a:link {
009.
text-decoration: none;
010.
color: #000;
011.
}
012.
a:visited {
013.
text-decoration: none;
014.
color: #000;
015.
}
016.
a:hover {
017.
text-decoration: none;
018.
color: #F00;
019.
}
020.
a:active {
021.
text-decoration: none;
022.
color: #000;
023.
}
024.
</style>
025.
</head>
026.
027.
<body>
028.
<table width=
"982"
height=
"432"
border=
"0"
>
029.
<tr>
030.
<td width=
"976"
height=
"21"
valign=
"top"
bgcolor=
"#00CCFF"
><div id=
"box-show"
><!-- เอาไว้ แสดง ไฟล์ media -->
031.
<div id=
"box-picshow"
>
032.
<div id=
"slide-holder"
>
033.
<div id=
"slide-runner"
>
034.
<?php
035.
$op
=isset(
$_GET
[
'option'
])?
$_GET
[
'option'
]:
''
;
036.
if
(
$op
==
""
){
037.
?>
038.
<!-- ส่วนนี้ แสดง รูปสไลด์
039.
<a href=
""
><img id=
"slide-img-1"
src=
"images/up-images/nature-photo.png"
class
=
"slide"
alt=
""
/></a>
040.
<a href=
""
><img id=
"slide-img-2"
src=
"images/up-images/nature-photo1.png"
class
=
"slide"
alt=
""
/></a>
041.
<a href=
""
><img id=
"slide-img-3"
src=
"images/up-images/nature-photo2.png"
class
=
"slide"
alt=
""
/></a>
042.
<a href=
""
><img id=
"slide-img-4"
src=
"images/up-images/nature-photo3.png"
class
=
"slide"
alt=
""
/></a>
043.
<a href=
""
><img id=
"slide-img-5"
src=
"images/up-images/nature-photo4.png"
class
=
"slide"
alt=
""
/></a>
044.
<a href=
""
><img id=
"slide-img-6"
src=
"images/up-images/nature-photo4.png"
class
=
"slide"
alt=
""
/></a>
045.
<a href=
""
><img id=
"slide-img-7"
src=
"images/up-images/nature-photo6.png"
class
=
"slide"
alt=
""
/></a>
046.
<div id=
"slide-controls"
>
047.
<p id=
"slide-client"
class
=
"text"
><strong>post: </strong><span></span></p>
048.
<p id=
"slide-desc"
class
=
"text"
></p>
049.
<p id=
"slide-nav"
></p>
050.
</div>
051.
-->
052.
<?php
053.
echo
"<img src=\"images/itsolution.gif\"/>"
;
054.
}
elseif
(
$op
==
"hrstock"
){
055.
echo
"<img src=\"images/hrstock.png\"/>"
;
056.
}
elseif
(
$op
==
"qalab"
){
057.
echo
"<img src=\"images/qalab.png\"/>"
;
058.
}
else
{
059.
echo
"<img src=\"images/itsolution.png\"/>"
;
060.
}
061.
?>
062.
</div>
063.
</div>
064.
</div>
065.
</div></td>
066.
</tr>
067.
<tr>
068.
<td height=
"133"
valign=
"top"
bgcolor=
"#00CCFF"
><table width=
"975"
height=
"247"
border=
"0"
align=
"left"
>
069.
<tr>
070.
<td width=
"162"
align=
"center"
bgcolor=
"#00FFCC"
><strong><font color=
"#030"
>HR STOCK</font></strong></td>
071.
<td width=
"764"
rowspan=
"10"
align=
"left"
valign=
"top"
bgcolor=
"#FFFFFF"
><form action=
"save.php"
name=
"frmAdd"
method=
"post"
>
072.
<?php
073.
ini_set
(
'display_errors'
, 1);
074.
error_reporting
(~0);
075.
076.
$serverName
=
"localhost"
;
077.
$userName
=
"root"
;
078.
$userPassword
=
"root"
;
079.
$dbName
=
"epr"
;
080.
081.
$conn
= mysqli_connect(
$serverName
,
$userName
,
$userPassword
,
$dbName
);
082.
083.
$sql
=
"SELECT * FROM customer"
;
084.
085.
$query
= mysqli_query(
$conn
,
$sql
);
086.
$query
= mysqli_query(
$conn
,
$sql
);
087.
?>
088.
<form name=
"frmSearch"
method=
"post"
action=
"<?=$_SERVER['SCRIPT_NAME'];?>"
>
089.
<table width=
"599"
border=
"1"
>
090.
<tr>
091.
<th>Select
092.
<select name=
"ddlSelect"
id=
"ddlSelect"
>
093.
<option>- Select -</option>
094.
<option value=
"id"
<?
if
(
$_POST
[
"ddlSelect"
]==
"name_prd"
){
echo
"selected"
;}?>name_prd</option>
095.
</select>
096.
Keyword
097.
<input name=
"txtKeyword"
type=
"text"
id=
"txtKeyword"
value=
"<?=$_POST["
txtKeyword
"];?>"
>
098.
<input type=
"submit"
value=
"เพิ่ม"
></th>
099.
</tr>
100.
</table>
101.
</form>
102.
<?
103.
104.
$objConnect
= mysql_connect(
"localhost"
,
"root"
,
"root"
)
or
die
(
"Error Connect to Database"
);
105.
$objDB
= mysql_select_db(
"epr"
);
106.
107.
$strSQL
=
"SELECT * FROM customer WHERE 1 "
;
108.
if
(
$_POST
[
"ddlSelect"
] !=
""
and
$_POST
[
"txtKeyword"
] !=
''
)
109.
{
110.
$strSQL
.=
" AND ("
.
$_POST
[
"ddlSelect"
].
" LIKE '%"
.
$_POST
[
"txtKeyword"
].
"%' ) "
;
111.
}
112.
113.
114.
$objQuery
= mysql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
115.
?>
116.
<table width=
"789"
border=
"1"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
bordercolor=
"#66CC66"
bgcolor=
"#FFFFFF"
>
117.
<tr>
118.
<th> <div align=
"center"
>วันที่</div></th>
119.
<th> <div align=
"center"
>รหัสสินค้า</div></th>
120.
<th> <div align=
"center"
>ชื่อสินค้า</div></th>
121.
<th> <div align=
"center"
>ราคาขายสินค้า</div></th>
122.
<th> <div align=
"center"
>ราคาต้นสินค้า</div></th>
123.
<th> <div align=
"center"
>จำนวนสินค้า</div></th>
124.
<th> <div align=
"center"
>อื่นๆ</div></th>
125.
<th width=
"65"
> <div align=
"center"
>Edit </div></th>
126.
</tr>
127.
<?php
128.
while
(
$result
=mysqli_fetch_array(
$query
,MYSQLI_ASSOC))
129.
{
130.
?>
131.
<tr>
132.
<td width=
"81"
><div align=
"center"
><?php
echo
date
(
'd-m-Y'
)?></div></td>
133.
<td width=
"76"
><div align=
"center"
><?php
echo
$result
[
"id_prd"
];?></div></td>
134.
<td width=
"82"
><div align=
"center"
><?php
echo
$result
[
"name_prd"
];?></div></td>
135.
<td width=
"158"
><div align=
"center"
><?php
echo
$result
[
"price_prd"
];?></div></td>
136.
<td width=
"123"
><div align=
"center"
><?php
echo
$result
[
"pricecost"
];?></div></td>
137.
<td width=
"103"
><div align=
"center"
><?php
echo
$result
[
"number"
];?></div></td>
138.
<td width=
"83"
align=
"right"
><div align=
"center"
><?php
echo
$result
[
"other"
];?></div></td>
139.
<td align=
"center"
><a href=
"edit1.php?id=<?php echo $result["
id
"];?>"
><img src=
"images/edit_24.png"
width=
"24"
height=
"24"
border=
"0"
/></a></td>
140.
</tr>
141.
<?php
142.
}
143.
?>
144.
</table>
145.
<?php
146.
mysqli_close(
$conn
);
147.
?>
148.
</form></td>
149.
</tr>
150.
<tr>
151.
<td height=
"17"
align=
"left"
bgcolor=
"#FFFFFF"
> <a href=
"index.php"
>HOME</a></td>
152.
</tr>
153.
<tr>
154.
<td height=
"21"
align=
"left"
bgcolor=
"#FFFFFF"
> ขายสินค้า</td>
155.
</tr>
156.
<tr>
157.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/addbk.gif"
alt=
""
width=
"16"
height=
"16"
border=
"0"
/> เพิ่มสิทธิ์ผู้ใช้งาน</td>
158.
</tr>
159.
<tr>
160.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/><a href=
"add1.php"
>ตั้งค่ารายการสินค้า</a></td>
161.
</tr>
162.
<tr>
163.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>ตั้งค่าหน่วยนับสินค้า</td>
164.
</tr>
165.
<tr>
166.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>ตั้งค่าประเภทสินค้า</td>
167.
</tr>
168.
<tr>
169.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/addbk.gif"
alt=
""
width=
"16"
height=
"16"
border=
"0"
/> รับเข้าสินค้า</td>
170.
</tr>
171.
<tr>
172.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/><a href=
"list1.php"
>ดูประวัติรับสินค้า</a></td>
173.
</tr>
174.
<tr>
175.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>รับสินค้า</td>
176.
</tr>
177.
<tr>
178.
<td align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/addbk.gif"
alt=
""
width=
"16"
height=
"16"
border=
"0"
/> รายงาน</td>
179.
</tr>
180.
<tr>
181.
<td height=
"23"
align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>รายงานรายวัน</td>
182.
</tr>
183.
<tr>
184.
<td height=
"23"
align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>รายงานรายสัปดาห์</td>
185.
</tr>
186.
<tr>
187.
<td height=
"23"
align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>รายงานรายเดือน</td>
188.
</tr>
189.
<tr>
190.
<td height=
"23"
align=
"left"
bgcolor=
"#FFFFFF"
> <img src=
"images/tag_blue.png"
alt=
""
width=
"16"
height=
"16"
/>รายงานรายปี</td>
191.
</tr>
192.
</table></td>
193.
</tr>
194.
<tr>
195.
<td height=
"23"
align=
"center"
valign=
"top"
bgcolor=
"#00CCFF"
>Pissanu&
copy
2016 | Power By <a href=
"http://www.jungwattana.com"
/></a></a> Design & Develop By <a href=
"http://www.jungwattana.com"
/></a>Pissanu Pongoubon</a> 08452669792 (pissanu@gmail.com)</td>
196.
</tr>
197.
</table>
198.
</body>
199.
</html>