<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/water_template2.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style24 {font-family: AngsanaUPC; font-size: 20px; } .style25 { font-family: AngsanaUPC; font-size: 22px; font-weight: bold; color: #0000FF; } .style28 { font-family: AngsanaUPC; font-size: 20px; font-weight: bold; color: #0000FF; } .style30 {font-family: AngsanaUPC; font-size: 20px; font-weight: bold; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { color: #0000FF; text-decoration: none; } a:hover { color: #FF00FF; text-decoration: none; } a:active { color: #FF00FF; text-decoration: none; } .style3 { color: #FFFFFF; font-weight: bold; font-family: AngsanaUPC; font-size: 22px; } .style22 {font-family: AngsanaUPC; font-size: 20px; color: #FFFFFF;} --> </style> </head> <body> <table width="798" height="460" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#C8E2F9"> <tr> <td height="140"><img src="header3.png" width="798" height="140" /></td> </tr> <tr> <td height="239" valign="top" bgcolor="#E2F2F5"><!-- InstanceBeginEditable name="EditRegion1" --> <p> </p> <?php include ('connect.php'); $sql = "SELECT * FROM receipt ORDER BY cus_id ASC "; $result = mysql_query($sql); $num_row = mysql_num_rows($result) ?> <form id="form2" name="form2" method="post" action=""> <table width="646" border="1" align="center" cellpadding="1" cellspacing="0"> <tr> <td colspan="6"><span class="style28">มีข้อมูลรายรับทั้งสิ้น รายการ </span></td> </tr> <tr> <td width="84" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">เลขที่ใบเสร็จ </span></strong></div></td> <td width="83" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">รหัสผู้ใช้น้ำ</span></strong></div></td> <td width="162" bgcolor="#A9D2F3"><div align="center"><span class="style30">ชื่อ -นามสกุล </span></div></td> <td width="107" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ประจำเดือน</span></strong></div></td> <td width="72" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ปี</span></strong></div></td> <td width="112" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">จำนวนเงิน (บาท)</span></strong></div></td> </tr> <tr> <?php // ѹ SQL while ( $rs = mysql_fetch_row( $result ) ) { $w_p = $price>=$price ; $c_u = $price + $price; $s = $c_u+$w_p; $s++; $cus_id = $rs[2]; $receipt_id = $rs[1]; $cus_name = $rs[3]; $cus_lastname = $rs[4]; $price = $rs[12]; $month = $rs[14]; $year = $rs[15]; ?> <td><div align="center"><span class="style24"><?php echo $receipt_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $cus_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo "$cus_name"." $cus_lastname" ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $month ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $year ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $price ?></span></div></td> </tr> <?php }?> </table> <br /> <table width="308" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="308" height="124" valign="top"><fieldset> <legend><span class="style25">สรุปยอดรายรับเดือนนี้</span></legend> <br /> <table width="254" border="0" align="center"> <tr> <td width="143"><div align="right"><strong><span class="style24">รวมเป็นเงินทั้งสิ้น : </span></strong></div></td> <td width="42"><input name="textfield2" type="text" size="7" value="<? echo $s ?>"/></td> <td width="55"><strong><span class="style24">บาท</span></strong></td> </tr> </table> <p> </p> </fieldset> </td> </tr> </table> <p align="center" class="style28"><a href="index11.php">< กลับหน้าแรก ></a></p> </form> <p> </p> <!-- InstanceEndEditable --></td> </tr> <tr> <td height="30" bgcolor="#3F94E9"><div align="center" class="style22">การประปาหมู่บ้านปากทาง<br /> 24 ม.13 ต.ตลิ่งชัน อ.บันนังสตา จ.ยะลา 95130<br /> โทรศัพท์ : 081-7983950 </div></td> </tr> </table> </body> <!-- InstanceEnd --></html>
$sum=0; while ( $rs = mysql_fetch_row( $result ) ){ $sum=$sum+$rs[12] } echo $sum;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/water_template2.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style24 {font-family: AngsanaUPC; font-size: 20px; } .style25 { font-family: AngsanaUPC; font-size: 22px; font-weight: bold; color: #0000FF; } .style28 { font-family: AngsanaUPC; font-size: 20px; font-weight: bold; color: #0000FF; } .style30 {font-family: AngsanaUPC; font-size: 20px; font-weight: bold; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { color: #0000FF; text-decoration: none; } a:hover { color: #FF00FF; text-decoration: none; } a:active { color: #FF00FF; text-decoration: none; } .style3 { color: #FFFFFF; font-weight: bold; font-family: AngsanaUPC; font-size: 22px; } .style22 {font-family: AngsanaUPC; font-size: 20px; color: #FFFFFF;} --> </style> </head> <body> <table width="798" height="460" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#C8E2F9"> <tr> <td height="140"><img src="header3.png" width="798" height="140" /></td> </tr> <tr> <td height="239" valign="top" bgcolor="#E2F2F5"><!-- InstanceBeginEditable name="EditRegion1" --> <p> </p> <?php include ('connect.php'); $sql = "SELECT * FROM receipt ORDER BY cus_id ASC "; $result = mysql_query($sql); $num_row = mysql_num_rows($result) ?> <form id="form2" name="form2" method="post" action=""> <table width="646" border="1" align="center" cellpadding="1" cellspacing="0"> <tr> <td colspan="6"><span class="style28">มีข้อมูลรายรับทั้งสิ้น รายการ </span></td> </tr> <tr> <td width="84" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">เลขที่ใบเสร็จ </span></strong></div></td> <td width="83" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">รหัสผู้ใช้น้ำ</span></strong></div></td> <td width="162" bgcolor="#A9D2F3"><div align="center"><span class="style30">ชื่อ -นามสกุล </span></div></td> <td width="107" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ประจำเดือน</span></strong></div></td> <td width="72" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ปี</span></strong></div></td> <td width="112" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">จำนวนเงิน (บาท)</span></strong></div></td> </tr> <tr> <?php // ѹ SQL $sum=0; while ( $rs = mysql_fetch_row( $result ) ) { $w_p = $price>=$price ; $c_u = $price + $price; $s = $c_u+$w_p; $s++; $cus_id = $rs[2]; $receipt_id = $rs[1]; $cus_name = $rs[3]; $cus_lastname = $rs[4]; $price = $rs[12]; $month = $rs[14]; $year = $rs[15]; $sum=$sum+$rs[12]; ?> <td><div align="center"><span class="style24"><?php echo $receipt_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $cus_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo "$cus_name"." $cus_lastname" ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $month ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $year ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $price ?></span></div></td> </tr> <?php }?> </table> <br /> <table width="308" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="308" height="124" valign="top"><fieldset> <legend><span class="style25">สรุปยอดรายรับเดือนนี้</span></legend> <br /> <table width="254" border="0" align="center"> <tr> <td width="143"><div align="right"><strong><span class="style24">รวมเป็นเงินทั้งสิ้น : </span></strong></div></td> <td width="42"><input name="textfield2" type="text" size="7" value="<?php echo $sum; ?>"/></td> <td width="55"><strong><span class="style24">บาท</span></strong></td> </tr> </table> <p> </p> </fieldset> </td> </tr> </table> <p align="center" class="style28"><a href="index11.php">< กลับหน้าแรก ></a></p> </form> <p> </p> <!-- InstanceEndEditable --></td> </tr> <tr> <td height="30" bgcolor="#3F94E9"><div align="center" class="style22">การประปาหมู่บ้านปากทาง<br /> 24 ม.13 ต.ตลิ่งชัน อ.บันนังสตา จ.ยะลา 95130<br /> โทรศัพท์ : 081-7983950 </div></td> </tr> </table> </body> <!-- InstanceEnd --></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/water_template2.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Untitled Document</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style24 {font-family: AngsanaUPC; font-size: 20px; } .style25 { font-family: AngsanaUPC; font-size: 22px; font-weight: bold; color: #0000FF; } .style28 { font-family: AngsanaUPC; font-size: 20px; font-weight: bold; color: #0000FF; } .style30 {font-family: AngsanaUPC; font-size: 20px; font-weight: bold; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { color: #0000FF; text-decoration: none; } a:hover { color: #FF00FF; text-decoration: none; } a:active { color: #FF00FF; text-decoration: none; } .style3 { color: #FFFFFF; font-weight: bold; font-family: AngsanaUPC; font-size: 22px; } .style22 {font-family: AngsanaUPC; font-size: 20px; color: #FFFFFF;} --> </style> </head> <body> <table width="798" height="460" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#C8E2F9"> <tr> <td height="140"><img src="header3.png" width="798" height="140" /></td> </tr> <tr> <td height="239" valign="top" bgcolor="#E2F2F5"><!-- InstanceBeginEditable name="EditRegion1" --> <p> </p> <p> <?php include ('connect.php'); $sql = "SELECT * FROM receipt ORDER BY cus_id ASC "; $result = mysql_query($sql); $num_row = mysql_num_rows($result) ?> </p> <form id="form1" name="form1" method="post" action="12.php"> <table width="540" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="540" height="124" valign="top"><fieldset> <legend><span class="style25">ค้นหาข้อมูลรายรับค่าน้ำ</span></legend> <br /> <table width="480" border="0" align="center"> <tr> <td width="86"><div align="right" class="style24">เลือกเดือน :</div></td> <td width="105"><select name="select"> <option value="มกราคม">มกราคม</option> <option value="กุมภาพันธ์">กุมภาพันธ์</option> <option value="มีนาคม">มีนาคม</option> <option value="เมษายน">เมษายน</option> <option value="พฤษภาคม">พฤษภาคม</option> <option value="มิถุนายน">มิถุนายน</option> <option value="กรกฎาคม">กรกฎาคม</option> <option value="สิงหาคม">สิงหาคม</option> <option value="กันยายน">กันยายน</option> <option value="ตุลาคม">ตุลาคม</option> <option value="พฤศจิกายน">พฤศจิกายน</option> <option value="ธันวาคม">ธันวาคม</option> </select></td> <td width="54"><div align="right" class="style24">เลือกปี : </div></td> <td width="104"><select name="select2"> <option value="2555">2555</option> <option value="2556" selected="selected">2556</option> <option value="2557">2557</option> </select></td> <td width="109"><input type="submit" name="Submit" value="แสดงข้อมูล" /></td> </tr> </table> <p> </p> </fieldset> </td> </tr> </table> </form> <form id="form2" name="form2" method="post" action=""> <table width="646" border="1" align="center" cellpadding="1" cellspacing="0"> <tr> <td colspan="6"><span class="style28">มีข้อมูลรายรับทั้งสิ้น รายการ </span></td> </tr> <tr> <td width="84" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">เลขที่ใบเสร็จ </span></strong></div></td> <td width="83" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">รหัสผู้ใช้น้ำ</span></strong></div></td> <td width="162" bgcolor="#A9D2F3"><div align="center"><span class="style30">ชื่อ -นามสกุล </span></div></td> <td width="107" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ประจำเดือน</span></strong></div></td> <td width="72" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">ปี</span></strong></div></td> <td width="112" bgcolor="#A9D2F3"><div align="center"><strong><span class="style24">จำนวนเงิน (บาท)</span></strong></div></td> </tr> <tr> <?php // ѹ SQL $sum=0; while ( $rs = mysql_fetch_row( $result ) ) { $w_p = $price>=$price ; $c_u = $price + $price; $s = $c_u+$w_p; $s++; $cus_id = $rs[2]; $receipt_id = $rs[1]; $cus_name = $rs[3]; $cus_lastname = $rs[4]; $price = $rs[12]; $month = $rs[14]; $year = $rs[15]; $sum=$sum+$rs[12]; ?> <td><div align="center"><span class="style24"><?php echo $receipt_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $cus_id ?></span></div></td> <td><div align="center"><span class="style24"><?php echo "$cus_name"." $cus_lastname" ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $month ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $year ?></span></div></td> <td><div align="center"><span class="style24"><?php echo $price ?></span></div></td> </tr> <?php }?> </table> <br /> <table width="308" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="308" height="124" valign="top"><fieldset> <legend><span class="style25">สรุปยอดรายรับเดือนนี้</span></legend> <br /> <table width="254" border="0" align="center"> <tr> <td width="143"><div align="right"><strong><span class="style24">รวมเป็นเงินทั้งสิ้น : </span></strong></div></td> <td width="42"><input name="textfield2" type="text" size="7" value="<?php echo $sum; ?>"/></td> <td width="55"><strong><span class="style24">บาท</span></strong></td> </tr> </table> <p> </p> </fieldset> </td> </tr> </table> <p align="center" class="style28"><a href="index11.php">< กลับหน้าแรก ></a></p> </form> <p> </p> <!-- InstanceEndEditable --></td> </tr> <tr> <td height="30" bgcolor="#3F94E9"><div align="center" class="style22">การประปาหมู่บ้านปากทาง<br /> 24 ม.13 ต.ตลิ่งชัน อ.บันนังสตา จ.ยะลา 95130<br /> โทรศัพท์ : 081-7983950 </div></td> </tr> </table> </body> <!-- InstanceEnd --></html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง