<table width="700" height="318" align="center"> <tr bgcolor="#00C000"> <td height="50" colspan="4" align="center" bgcolor="#00C000"><font color="#E5FECD"><h3><strong>ระบบเพิ่มข้อมูลค่าใช้จ่ายรายเดือน</strong></h3></font></td> </tr> <? if($cols>0){ for($i=1;$i<=$cols;$i++){$rowCost=mysql_fetch_array($rs); ?> <? //เลือกดึงข้อมูลค่าใช้จ่ายของห้องครั้งล่าสุด $sql="SELECT * FROM invoice WHERE ID_Ro=".$rowCost['ID_Ro']." ORDER BY ID_In desc"; $result=mysql_query($sql)or die(mysql_error()); $row=mysql_fetch_array($result); //เลือกดึงรายละเอียดของแต่ละห้องมา $sqlRoom="SELECT * FROM room WHERE ID_Ro=".$rowCost['ID_Ro'].""; $resultRoom=mysql_query($sqlRoom)or die(mysql_error()); $rowRoom=mysql_fetch_array($resultRoom); ?> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">เลขที่ห้องพัก</td> <td height="30" align="left" bgcolor="#CCFFCC"><label for="NumberRo"></label> <select name="ID_Ro" size="1" id="ID_Ro"> <option selected="selected">กรุณาเลือกเลขที่ห้องพัก</option> <?php $sql = "select * from room where ID_Ro ;"; $rs = mysql_query($sql,$con); while($cols = mysql_fetch_array($rs)) if($rs){ echo "<option value='$cols[0]'>$cols[1]</option>"; } mysql_free_result($rs); ?> </select> <input type="submit" name="button3" id="button3" value="ตรวจสอบ" /></td></tr> <tr bgcolor="#669966"> <td height="36" align="left" bgcolor="#CCFFCC">ค่าใช้จ่ายประจำเดือน</td> <td height="36" align="left" bgcolor="#CCFFCC"><label for="MonthIn"></label> <select name="MonthIn" size="1" id="MonthIn"> <option selected="selected">กรุณาเลือกเดือน</option> <option>มกราคม</option> <option>กุมภาพันธ์</option> <option>มีนาคม</option> <option>เมษายน</option> <option>พฤษภาคม</option> <option>มิถุนายน</option> <option>กรกฎาคม</option> <option>สิงหาคม</option> <option>กันยายน</option> <option>ตุลาคม</option> <option>พฤศจิกายน</option> <option>ธันวาคม</option> </select></td></tr> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">วันที่ต้องชำระ</td> <td width="376" height="30" colspan="3" bgcolor="#CCFFCC"> <input type="date" name="DateIn" id="DateIn" value="<?=date('d-M-y')?>"/></td> </tr> <tr bgcolor="#669966"> <td width="312" height="30" align="left" bgcolor="#CCFFCC">หน่วยค่าน้ำเดือนที่แล้ว</td> <td height="30" colspan="3" bgcolor="#CCFFCC"> <label for="invoice1"></label> <input name="invoice1<?=$i;?>" type="text" class="in1" disabled="disabled" id="invoice1" value="<?=$row['invoice2']?>" readonly="readonly"/> หน่วย</td> </tr> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">หน่วยค่าน้ำเดือนนี้</td> <td height="30" colspan="3" bgcolor="#CCFFCC"><label for="invoice2"></label> <input name="invoice2<?=$i;?>" class="in2" type="text" id="invoice2" />หน่วย</td> </tr> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">หน่วยค่าไฟเดือนที่แล้ว</td> <td height="30" colspan="3" bgcolor="#CCFFCC"><label for="invoice3"></label> <input name="invoice3<?=$i;?>" class="in3" type="text" disabled="disabled" id="invoice3" value="<?=$row['invoice4']?>" readonly="readonly"/>หน่วย</td> </tr> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">หน่วยค่าไฟเดือนนี้</td> <td height="30" align="left" bgcolor="#CCFFCC"><input name="invoice4<?=$i;?>" class="in4" type="text" id="invoice4" />หน่วย</td> </tr> <tr bgcolor="#669966"> <td height="30" align="left" bgcolor="#CCFFCC">ค่าเน็ต</td> <td height="30" align="left" bgcolor="#CCFFCC"><input name="NetIn" type="text" id="NetIn" maxlength="3" />บาท</td> </tr> <? } } else if($numCost==0){ ?> <tr> <td colspan="7" align="center">ไม่มีข้อมูล</td> </tr> <? } ?> </table>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง