<?php require_once('../Connections/ful_mmr.php'); ?> <?php mysql_select_db($database_ful_mmr, $ful_mmr); $query_ticket = "SELECT * FROM ticket"; $ticket = mysql_query($query_ticket, $ful_mmr) or die(mysql_error()); $row_ticket = mysql_fetch_assoc($ticket); $totalRows_ticket = mysql_num_rows($ticket); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <title>Untitled Document</title> </head> <body> <form action="" method="post" name="hr" id="hr"> <p> </p> <table width="605" border="1"> <tr> <td width="45"><div align="center">ticket</div></td> <td width="120"><div align="center">user</div></td> <td width="120"><div align="center">Date</div></td> <td width="45"><div align="center">Room</div></td> <td width="120"><div align="center">Status</div></td> <td width="40"><div align="center">Hour</div></td> <td width="120"><div align="center">Total</div></td> </tr> <?php do { ?> <tr> <td width="45" align="center"><div align="center"><?php echo $row_ticket['ticket']; ?></div></td> <?php if ($row_ticket['room'] =="Smal"){$rate="150";}?> <? if ($row_ticket['room'] =="Medi"){$rate="200";}?> <? if ($row_ticket['room'] =="Larg"){$rate="250";} ?> <? if ($row_ticket['status'] == "wait"){$status="0";} ?> <? if ($row_ticket['status'] == "complete"){$status="1";}?> <? if ($row_ticket['status'] == "forfeit"){$status="0.4";} ?> <? if ($row_ticket['status'] == "approve"){$status="0.4";} ?> <td width="120"><div align="center"><?php echo $row_ticket['user']; ?></div></td> <td width="120"><div align="center"><?php echo $row_ticket['stamp']; ?></div></td> <td width="45" align="center"><div align="center"><?php echo $row_ticket['room']; ?></div></td> <td width="120"><div align="center"><?php echo $row_ticket['status']; ?></div></td> <td width="40"><div align="center"><?php echo $row_ticket['8']+$row_ticket['9']+$row_ticket['10']+$row_ticket['11']+$row_ticket['12']+$row_ticket['13']+$row_ticket['14']+$row_ticket['15']+$row_ticket['16']+$row_ticket['17']+$row_ticket['18']+$row_ticket['19'] +$row_ticket['20']+$row_ticket['21']+$row_ticket['22']+$row_ticket['23']+$row_ticket['24'] ; ?></div></td> <td width="120"><?php echo $avg = (($row_ticket['8']+$row_ticket['9']+$row_ticket['10']+$row_ticket['11']+$row_ticket['12']+$row_ticket['13']+$row_ticket['14']+$row_ticket['15']+$row_ticket['16']+$row_ticket['17']+$row_ticket['18']+ $row_ticket['19']+$row_ticket['20']+$row_ticket['21']+$row_ticket['22']+$row_ticket['23']+$row_ticket['24'])*$rate)*$status; ?> <div align="center"></div></td> </tr> <?php } while ($row_ticket = mysql_fetch_assoc($ticket)); ?> </table> <table width="602" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="17%"> </td> <td width="17%"> </td> <td width="17%"> </td> <td width="11%"> </td> <td width="18%">total</td> <td width="20%"><? echo $avg++ ?></td> </tr> </table> <p> </p> <p> <input name="8" type="hidden" id="8" value="<?php echo $row_ticket['8']; ?>"> <input name="9" type="hidden" id="9" value="<?php echo $row_ticket['9']; ?>"> <input name="10" type="hidden" id="10" value="<?php echo $row_ticket['10']; ?>"> <input name="11" type="hidden" id="11" value="<?php echo $row_ticket['11']; ?>"> <input name="12" type="hidden" id="12" value="<?php echo $row_ticket['12']; ?>"> <input name="13" type="hidden" id="13" value="<?php echo $row_ticket['13']; ?>"> <input name="14" type="hidden" id="14" value="<?php echo $row_ticket['14']; ?>"> <input name="15" type="hidden" id="15" value="<?php echo $row_ticket['15']; ?>"> <input name="16" type="hidden" id="16" value="<?php echo $row_ticket['16']; ?>"> <input name="17" type="hidden" id="17" value="<?php echo $row_ticket['17']; ?>"> <input name="18" type="hidden" id="18" value="<?php echo $row_ticket['18']; ?>"> <input name="19" type="hidden" id="19" value="<?php echo $row_ticket['19']; ?>"> <input name="20" type="hidden" id="20" value="<?php echo $row_ticket['20']; ?>"> <input name="21" type="hidden" id="21" value="<?php echo $row_ticket['21']; ?>"> <input name="22" type="hidden" id="22" value="<?php echo $row_ticket['22']; ?>"> <input name="23" type="hidden" id="23" value="<?php echo $row_ticket['23']; ?>"> <input name="24" type="hidden" id="24" value="<?php echo $row_ticket['24']; ?>"> <input name="hiddenField" type="hidden" value="<?php echo $row_ticket['room']; ?>"> </p> <p> </p> </form> </body> </html> <?php mysql_free_result($ticket); ?>
$total = $total + $avg;
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง