<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>::ข้อมูลรายรับ-จ่าย::</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#tabs" ).tabs(); } ); </script> </head> <style type="text/css"> html, body { height: 100%; /* ให้ html และ body สูงเต็มจอภาพไว้ก่อน */ width: 100%; margin: 0; padding: 0; } .wrapper { display: block; min-height: 100%; /* real browsers */ height: auto !important; /* real browsers */ height: 100%; /* IE6 bug */ margin-bottom: -20px; /* กำหนด margin-bottom ให้ติดลบเท่ากับความสูงของ footer */ } .footer { height: 20px; /* ความสูงของ footer */ display: block; text-align: center; } body { background-image : url('images/green21.jpg'); background-attachment : fixed } </style> <body> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <br> <? include'function.php'; ?> <div align="center"> <div id="tabs" style="width:1200px;"> <ul style="background-color:lightgreen;height:40px;text-align:center;"> <p></p><h4><b><font color="darkgreen">ค่าเช่าประจำเดือน</font></b></h4> <div align="center"><li></li></div> </ul> <div id="tabs-1"> <? $monthai[1] = "มกราคม";$monthai[2] = "กุมภาพันธ์";$monthai[3] = "มีนาคม";$monthai[4] = "เมษายน";$monthai[5] = "พฤษภาคม";$monthai[6] = "มิถุนายน";$monthai[7] = "กรกฎาคม";$monthai[8] = "สิงหาคม";$monthai[9] = "กันยายน";$monthai[10] = "ตุลาคม";$monthai[11] = "พฤศจิกายน";$monthai[12] = "ธันวาคม"; ?> <br> <div align="center"> <form name="frmSearch" method="get" action="<?php echo $_SERVER['SCRIPT_NAME'];?>"> <table style="width:1050px;" class="table table-striped table-bordered"> <tr> <td align="center" bgcolor="lightblue"><font size="3" color="darkblue"><b>เดือน</b></font> <select name="txtKeyword" style="height:30px;"> <option value="">-- เดือน --</option> <option value="1">มกราคม</option> <option value="2">กุมภาพันธ์</option> <option value="3">มีนาคม</option> <option value="4">เมษายน</option> <option value="5">พฤษภาคม</option> <option value="6">มิถุนายน</option> <option value="7">กรกฎาคม</option> <option value="8">สิงหาคม</option> <option value="9">กันยายน</option> <option value="10">ตุลาคม</option> <option value="11">พฤศจิกายน</option> <option value="12">ธันวาคม</option> </select> <font size="3" color="darkblue"><b>ปี</b></font> <select name="txtKeyword2" style="width:60px;height:30px;"> <option value="">-- ปี --</option> <? for($i=2010;$i<=date("Y");$i++){ ?> <option value="<?= $i; ?>"><?= $i+543 ?></option> <? }?> </select> <input type="submit" class="btn btn-success" value="ค้นหา"> <a href="searchmonthtest.php"> <input type="button" name="clear" class="btn btn-danger" value="เคลียร์"> </a> </td> </tr> </table> </form> <? if($_GET["txtKeyword"] and $_GET["txtKeyword2"] ) { include 'connect.php'; $month = $_GET["txtKeyword"]; $year = $_GET["txtKeyword2"]; ?> <? $strSQL = "SELECT * FROM tb_payment WHERE month(Date_Pay) = '$month' and year(Date_Pay) = '$year' "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> <table style="width:1050px;" class="table table-striped table-bordered" > <tr> <td width="91" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>รหัสค่าเช่า</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>วันที่ชำระเงิน</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ห้องพัก</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าห้องพัก<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าไฟฟ้า<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าน้ำประปา<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าขยะ<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าปรับ<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>จำนวนเงิน<br>(บาท)</b></font></div></td> </tr> <? while ($objResult = mysql_fetch_array($objQuery)){ $payid = $objResult["Pay_ID"]; $payidshow = substr("00000".$payid,-5,5); $sumroomprice += (int)$objResult['Room_Price']; $sumelecprice += (int)$objResult['Elec_Price']; $sumwaterprice += (int)$objResult['Water_Price']; $sumbinprice += (int)$objResult['Bin_Price']; $sumlimitprice += (int)$objResult['Limit_Price']; $sumtotalprice += (int)$objResult['Sum_Price']; ?> <tr> <td align="center"><?php echo $payidshow; ?></td> <td ><?php echo Daythai($objResult["Date_Pay"]);?></td> <td align="center">ห้อง <? echo $objResult["Room"];?> </td> <td align="center"> <? echo number_format($objResult["Room_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Elec_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Water_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Bin_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Limit_Price"]);?> </td> <td align="center"><?php echo number_format($objResult["Sum_Price"]);?></td> </tr> <? } ?> <tr> <td style="border-left-color:white;border-right-color:white;border-bottom-color:white;"></td> <td style="border-bottom-color:white;"></td> <td bgcolor="lightblue" align="center"><font color="darkblue"><b>รวมเงิน</b></font></td> <td align="center"><b><u><?php echo number_format($sumroomprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumelecprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumwaterprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumbinprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumlimitprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumtotalprice); ?></u></b></td> </tr> </table> <br> <?php mysql_close($objConnect); } ?> </div> <br> </div> </div> </div> </div> </div> </body> </html>
<?php <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>::ข้อมูลรายรับ-จ่าย::</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#tabs" ).tabs(); } ); </script> </head> <style type="text/css"> html, body { height: 100%; /* ให้ html และ body สูงเต็มจอภาพไว้ก่อน */ width: 100%; margin: 0; padding: 0; } .wrapper { display: block; min-height: 100%; /* real browsers */ height: auto !important; /* real browsers */ height: 100%; /* IE6 bug */ margin-bottom: -20px; /* กำหนด margin-bottom ให้ติดลบเท่ากับความสูงของ footer */ } .footer { height: 20px; /* ความสูงของ footer */ display: block; text-align: center; } body { background-image : url('images/green21.jpg'); background-attachment : fixed } </style> <body> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <br> <? include'function.php'; ?> <div align="center"> <div id="tabs" style="width:1200px;"> <ul style="background-color:lightgreen;height:40px;text-align:center;"> <p></p><h4><b><font color="darkgreen">ค่าเช่าประจำเดือน</font></b></h4> <div align="center"><li></li></div> </ul> <div id="tabs-1"> <? $monthai[1] = "มกราคม";$monthai[2] = "กุมภาพันธ์";$monthai[3] = "มีนาคม";$monthai[4] = "เมษายน";$monthai[5] = "พฤษภาคม";$monthai[6] = "มิถุนายน";$monthai[7] = "กรกฎาคม";$monthai[8] = "สิงหาคม";$monthai[9] = "กันยายน";$monthai[10] = "ตุลาคม";$monthai[11] = "พฤศจิกายน";$monthai[12] = "ธันวาคม"; ?> <br> <div align="center"> <form name="frmSearch" method="get" action="<?php echo $_SERVER['SCRIPT_NAME'];?>"> <table style="width:1050px;" class="table table-striped table-bordered"> <tr> <td align="center" bgcolor="lightblue"><font size="3" color="darkblue"><b>เดือน</b></font> <select name="txtKeyword" style="height:30px;"> <option value="">-- เดือน --</option> <option value="1">มกราคม</option> <option value="2">กุมภาพันธ์</option> <option value="3">มีนาคม</option> <option value="4">เมษายน</option> <option value="5">พฤษภาคม</option> <option value="6">มิถุนายน</option> <option value="7">กรกฎาคม</option> <option value="8">สิงหาคม</option> <option value="9">กันยายน</option> <option value="10">ตุลาคม</option> <option value="11">พฤศจิกายน</option> <option value="12">ธันวาคม</option> </select> <font size="3" color="darkblue"><b>ปี</b></font> <select name="txtKeyword2" style="width:60px;height:30px;"> <option value="">-- ปี --</option> <? for($i=2010;$i<=date("Y");$i++){ ?> <option value="<?= $i; ?>"><?= $i+543 ?></option> <? }?> </select> <input type="submit" class="btn btn-success" value="ค้นหา"> <a href="searchmonthtest.php"> <input type="button" name="clear" class="btn btn-danger" value="เคลียร์"> </a> </td> </tr> </table> </form> <? if($_GET["txtKeyword"] != "" && $_GET["txtKeyword2"] != "") { include 'connect.php'; $month = $_GET["txtKeyword"]; $year = $_GET["txtKeyword2"]; ?> <? $strSQL = "SELECT * FROM tb_payment WHERE month(Date_Pay) = '$month' and year(Date_Pay) = '$year' "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $num = mysql_num_rows($objQuery); if($num >= 1){ ?> <table style="width:1050px;" class="table table-striped table-bordered" > <tr> <td width="91" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>รหัสค่าเช่า</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>วันที่ชำระเงิน</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ห้องพัก</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าห้องพัก<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าไฟฟ้า<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าน้ำประปา<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าขยะ<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>ค่าปรับ<br>(บาท)</b></font></div></td> <td width="98" bgcolor="lightblue"><div align="center"><font color="darkblue"><b>จำนวนเงิน<br>(บาท)</b></font></div></td> </tr> <? while ($objResult = mysql_fetch_array($objQuery)){ $payid = $objResult["Pay_ID"]; $payidshow = substr("00000".$payid,-5,5); $sumroomprice += (int)$objResult['Room_Price']; $sumelecprice += (int)$objResult['Elec_Price']; $sumwaterprice += (int)$objResult['Water_Price']; $sumbinprice += (int)$objResult['Bin_Price']; $sumlimitprice += (int)$objResult['Limit_Price']; $sumtotalprice += (int)$objResult['Sum_Price']; ?> <tr> <td align="center"><?php echo $payidshow; ?></td> <td ><?php echo Daythai($objResult["Date_Pay"]);?></td> <td align="center">ห้อง <? echo $objResult["Room"];?> </td> <td align="center"> <? echo number_format($objResult["Room_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Elec_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Water_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Bin_Price"]);?> </td> <td align="center"> <? echo number_format($objResult["Limit_Price"]);?> </td> <td align="center"><?php echo number_format($objResult["Sum_Price"]);?></td> </tr> <? } ?> <tr> <td style="border-left-color:white;border-right-color:white;border-bottom-color:white;"></td> <td style="border-bottom-color:white;"></td> <td bgcolor="lightblue" align="center"><font color="darkblue"><b>รวมเงิน</b></font></td> <td align="center"><b><u><?php echo number_format($sumroomprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumelecprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumwaterprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumbinprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumlimitprice); ?></u></b></td> <td align="center"><b><u><?php echo number_format($sumtotalprice); ?></u></b></td> </tr> </table> <br> <?php mysql_close($objConnect); } else { /////////แสดงข้อความตรงนี้เมื่อไม่พบข้อมูล////////// } } ?> </div> <br> </div> </div> </div> </div> </div> </body> </html> ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง