002.
<html xmlns=
"http://www.w3.org/1999/xhtml"
><!-- InstanceBegin template=
"/Templates/water_template2.dwt.php"
codeOutsideHTMLIsLocked=
"false"
-->
003.
<head>
004.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
005.
<!-- InstanceBeginEditable name=
"doctitle"
-->
006.
<title>Untitled Document</title>
007.
<!-- InstanceEndEditable -->
008.
<!-- InstanceBeginEditable name=
"head"
-->
009.
<style type=
"text/css"
>
010.
<!--
011.
.style24 {font-family: AngsanaUPC; font-size: 20px; }
012.
.style25 {
013.
font-family: AngsanaUPC;
014.
font-size: 22px;
015.
font-weight: bold;
016.
color: #0000FF;
017.
}
018.
.style28 {
019.
font-family: AngsanaUPC;
020.
font-size: 20px;
021.
font-weight: bold;
022.
color: #0000FF;
023.
}
024.
.style30 {font-family: AngsanaUPC; font-size: 20px; font-weight: bold; }
025.
-->
026.
</style>
027.
<!-- InstanceEndEditable -->
028.
<style type=
"text/css"
>
029.
<!--
030.
a:link {
031.
color: #0000FF;
032.
text-decoration: none;
033.
}
034.
a:visited {
035.
color: #0000FF;
036.
text-decoration: none;
037.
}
038.
a:hover {
039.
color: #FF00FF;
040.
text-decoration: none;
041.
}
042.
a:active {
043.
color: #FF00FF;
044.
text-decoration: none;
045.
}
046.
.style3 {
047.
color: #FFFFFF;
048.
font-weight: bold;
049.
font-family: AngsanaUPC;
050.
font-size: 22px;
051.
}
052.
.style22 {font-family: AngsanaUPC; font-size: 20px; color: #FFFFFF;}
053.
-->
054.
</style>
055.
</head>
056.
057.
<body>
058.
059.
<table width=
"798"
height=
"460"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
bordercolor=
"#C8E2F9"
>
060.
<tr>
061.
<td height=
"140"
><img src=
"header3.png"
width=
"798"
height=
"140"
/></td>
062.
</tr>
063.
<tr>
064.
<td height=
"239"
valign=
"top"
bgcolor=
"#E2F2F5"
><!-- InstanceBeginEditable name=
"EditRegion1"
-->
065.
<p> </p>
066.
067.
<p>
068.
<?php
069.
include
(
'connect.php'
);
070.
$sql
=
"SELECT * FROM receipt ORDER BY cus_id ASC "
;
071.
$result
= mysql_query(
$sql
);
072.
$num_row
= mysql_num_rows(
$result
)
073.
?>
074.
</p>
075.
<form id=
"form1"
name=
"form1"
method=
"post"
action=
"12.php"
>
076.
<table width=
"540"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
>
077.
<tr>
078.
<td width=
"540"
height=
"124"
valign=
"top"
><fieldset>
079.
<legend><span
class
=
"style25"
>ค้นหาข้อมูลรายรับค่าน้ำ</span></legend>
080.
<br />
081.
<table width=
"480"
border=
"0"
align=
"center"
>
082.
<tr>
083.
<td width=
"86"
><div align=
"right"
class
=
"style24"
>เลือกเดือน :</div></td>
084.
<td width=
"105"
><select name=
"select"
>
085.
<option value=
"มกราคม"
>มกราคม</option>
086.
<option value=
"กุมภาพันธ์"
>กุมภาพันธ์</option>
087.
<option value=
"มีนาคม"
>มีนาคม</option>
088.
<option value=
"เมษายน"
>เมษายน</option>
089.
<option value=
"พฤษภาคม"
>พฤษภาคม</option>
090.
<option value=
"มิถุนายน"
>มิถุนายน</option>
091.
<option value=
"กรกฎาคม"
>กรกฎาคม</option>
092.
<option value=
"สิงหาคม"
>สิงหาคม</option>
093.
<option value=
"กันยายน"
>กันยายน</option>
094.
<option value=
"ตุลาคม"
>ตุลาคม</option>
095.
<option value=
"พฤศจิกายน"
>พฤศจิกายน</option>
096.
<option value=
"ธันวาคม"
>ธันวาคม</option>
097.
</select></td>
098.
<td width=
"54"
><div align=
"right"
class
=
"style24"
>เลือกปี : </div></td>
099.
<td width=
"104"
><select name=
"select2"
>
100.
<option value=
"2555"
>2555</option>
101.
<option value=
"2556"
selected=
"selected"
>2556</option>
102.
<option value=
"2557"
>2557</option>
103.
</select></td>
104.
<td width=
"109"
><input type=
"submit"
name=
"Submit"
value=
"แสดงข้อมูล"
/></td>
105.
</tr>
106.
</table>
107.
<p> </p>
108.
</fieldset>
109.
110.
</td>
111.
</tr>
112.
</table>
113.
</form>
114.
<form id=
"form2"
name=
"form2"
method=
"post"
action=
""
>
115.
<table width=
"646"
border=
"1"
align=
"center"
cellpadding=
"1"
cellspacing=
"0"
>
116.
<tr>
117.
<td colspan=
"6"
><span
class
=
"style28"
>มีข้อมูลรายรับทั้งสิ้น รายการ </span></td>
118.
</tr>
119.
<tr>
120.
<td width=
"84"
bgcolor=
"#A9D2F3"
><div align=
"center"
><strong><span
class
=
"style24"
>เลขที่ใบเสร็จ </span></strong></div></td>
121.
<td width=
"83"
bgcolor=
"#A9D2F3"
><div align=
"center"
><strong><span
class
=
"style24"
>รหัสผู้ใช้น้ำ</span></strong></div></td>
122.
<td width=
"162"
bgcolor=
"#A9D2F3"
><div align=
"center"
><span
class
=
"style30"
>ชื่อ -นามสกุล </span></div></td>
123.
<td width=
"107"
bgcolor=
"#A9D2F3"
><div align=
"center"
><strong><span
class
=
"style24"
>ประจำเดือน</span></strong></div></td>
124.
<td width=
"72"
bgcolor=
"#A9D2F3"
><div align=
"center"
><strong><span
class
=
"style24"
>ปี</span></strong></div></td>
125.
<td width=
"112"
bgcolor=
"#A9D2F3"
><div align=
"center"
><strong><span
class
=
"style24"
>จำนวนเงิน (บาท)</span></strong></div></td>
126.
</tr>
127.
<tr> <?php
128.
129.
$sum
=0;
130.
while
(
$rs
= mysql_fetch_row(
$result
) )
131.
{
132.
133.
$w_p
=
$price
>=
$price
;
134.
$c_u
=
$price
+
$price
;
135.
$s
=
$c_u
+
$w_p
;
136.
$s
++;
137.
138.
$cus_id
=
$rs
[2];
139.
$receipt_id
=
$rs
[1];
140.
$cus_name
=
$rs
[3];
141.
$cus_lastname
=
$rs
[4];
142.
143.
$price
=
$rs
[12];
144.
$month
=
$rs
[14];
145.
$year
=
$rs
[15];
146.
$sum
=
$sum
+
$rs
[12];
147.
?>
148.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
$receipt_id
?></span></div></td>
149.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
$cus_id
?></span></div></td>
150.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
"$cus_name"
.
" $cus_lastname"
?></span></div></td>
151.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
$month
?></span></div></td>
152.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
$year
?></span></div></td>
153.
<td><div align=
"center"
><span
class
=
"style24"
><?php
echo
$price
?></span></div></td>
154.
</tr> <?php }?>
155.
</table>
156.
<br />
157.
<table width=
"308"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
>
158.
<tr>
159.
<td width=
"308"
height=
"124"
valign=
"top"
><fieldset>
160.
<legend><span
class
=
"style25"
>สรุปยอดรายรับเดือนนี้</span></legend>
161.
<br />
162.
<table width=
"254"
border=
"0"
align=
"center"
>
163.
<tr>
164.
<td width=
"143"
><div align=
"right"
><strong><span
class
=
"style24"
>รวมเป็นเงินทั้งสิ้น : </span></strong></div></td>
165.
<td width=
"42"
><input name=
"textfield2"
type=
"text"
size=
"7"
value=
"<?php echo $sum; ?>"
/></td>
166.
<td width=
"55"
><strong><span
class
=
"style24"
>บาท</span></strong></td>
167.
</tr>
168.
</table>
169.
<p> </p>
170.
</fieldset> </td>
171.
</tr>
172.
</table>
173.
<p align=
"center"
class
=
"style28"
><a href=
"index11.php"
>< กลับหน้าแรก ></a></p>
174.
</form>
175.
<p> </p>
176.
<!-- InstanceEndEditable --></td>
177.
</tr>
178.
<tr>
179.
<td height=
"30"
bgcolor=
"#3F94E9"
><div align=
"center"
class
=
"style22"
>การประปาหมู่บ้านปากทาง<br />
180.
24 ม.13 ต.ตลิ่งชัน อ.บันนังสตา จ.ยะลา 95130<br />
181.
โทรศัพท์ : 081-7983950 </div></td>
182.
</tr>
183.
</table>
184.
185.
</body>
186.
<!-- InstanceEnd --></html>