 |
|
ช่วยหน่อยครับ หน้านี้จะรับค่าวันที่ ที่ส่งมาจากอีกหน้าหนึ่ง เพื่อใช้ในการเรียกข้อมูลออกมาแสดง
ปัญหาคือ เวลาเรียก JQuery fancybox มาใช้เพื่อดูข้อมูลรายการที่เลือก แล้วพอออกจากการใช้งาน fancybox แล้วข้อมูลที่เรียกออกมามันหายหมด เป็นหน้าว่างน่ะครับ
ลองเอา session มาใช้แล้วก็ยังแก้ปัญหาไม่ได้ครับ
แล้วเวลากด reflesh หน้าก็จะมีข้อความ
to display this page, firefox must information that will repeat any action (such as a search or order confirmation) that was performed earlier.
Code (PHP)
<script type="text/javascript">
box = jQuery.noConflict(true);
box("#id").hide();
box(document).ready(function() {
box('a[id^="detail"]').fancybox({
'width' : '90%',
'height' : '70%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe',
onClosed : function() {
parent.location.reload(true);
}
});
});
</script>
<?
$date1=$_POST['date1'];
$date2=$_POST['date2'];
$room_id=$_POST['room_id'].$room_id=$_GET['room_id'];
require("../mysql.inc.php");
$query=mysql_query("select room_detail.*, room_rent.*, room_register.*, room_costs.*
from room_detail, room_rent, room_register, room_costs
where room_costs.De_Cos_ID between '$date1' and '$date2'
and room_detail.Room_Detail_ID = room_rent.Room_Detail_ID
and room_rent.De_Re_ID = room_register.De_Re_ID
and room_rent.De_Re_ID = room_costs.De_Re_ID
and room_register.Ro_Re_ID = room_costs.Ro_Re_ID
and room_register.Ro_Re_Status ='Y' order by room_costs.De_Cos_ID desc") or die (mysql_error());
while($del=mysql_fetch_array($query)){
?>
<tr bgcolor="#FFFFFF">
<td><div align="center"><? echo $del['De_Re_ID']; ?></div></td>
<td><div align="center"><? echo $del['De_Re_Name']; ?></div></td>
<td><div align="center"><? echo $del['De_Cos_ID']; ?> ถึง <? echo "$y-$mm-$d"; ?></div></td>
<td><div align="center"><? echo $del['De_Cos_Total']; ?></div></td>
<td><div align="center">
<?
$status=$del['De_Cos_Status'];
if($status=="N"){ ?>
<a href="costs_edit.php?De_Re_ID=<?=$del['De_Re_ID']; ?>&De_Cos_ID=<?=$del['De_Cos_ID']; ?>&edit='Y' "><input type="button" value="ชำระเงิน" /></a>
<?
} else if($status=="Y"){ ?>
<img src="images/opts_32.png" alt="" width="32" height="32" />
<? } ?>
</div></td>
<td><div align="center">
<a id="detail" class="various iframe" href="costs_detail3.php?room_id=<?=$del['De_Re_ID']; ?>&De_Cos_ID=<?=$del['De_Cos_ID']; ?>"><input type="button" value="รายละเอียด" /></a>
<a href="costs_edit.php?De_Re_ID=<?=$del['De_Re_ID']; ?>&De_Cos_ID=<?=$del['De_Cos_ID']; ?>&del='delete' "><input type="button" value="ลบ" /></a>
<a href="costs_receipt.php?room_id=<?=$del['De_Re_ID']; ?>&De_Cos_ID=<?=$del['De_Cos_ID']; ?>"><input type="button" value="ใบเสร็จ" /></a>
</div></td>
</tr>
<?
}
mysql_close($link);
?>
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2011-12-15 19:46:15 |
By :
ozma |
View :
1746 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |