|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_integration/requirement/common/CA/ |
Upload File : |
<?
//include("chk_permission.php");
session_start();
include("../../config/config.inc.php");
include("../../common/function.php");
include("var.inc.php");
//insert timeQuery
include("../../common/common_system.inc.php");
$ApplicationName="metting";
$time_start = getmicrotime();
//insert timeQuery
$xalert="";
if($session_apppermit[3][10] == "on" && $_SESSION['session_chkalert']!='true'){
$_SESSION['session_chkalert']="true";
$sql="SELECT count(*) as ncount From meeting_reserve_backup where alert_approve='0'";
$result=mysql_query($sql);
$row= mysql_fetch_array( $result);
$rownum= $row[ncount];
if($rownum>0){
$xalert=1;
}
}
//echo"<pre>";
//print_r($_SESSION);
################ HARD FIX
#$_SESSION[session_staffid] = 49 ;
$user=$_SESSION[session_staffid];
function Chkorg($userid){
$sql="Select org_staffgroup.groupname ,org_groupmember.gid FROM org_groupmember Inner Join epm_staff ON org_groupmember.staffid = epm_staff.staffid Inner Join org_staffgroup ON org_staffgroup.gid = org_groupmember.gid where epm_staff.staffid='$userid'";
$my_query=mysql_query($sql);
$xrow=@mysql_fetch_array($my_query);
return $xrow[gid] ;
}
################
#if ($jump != ""){$jump=$jump;}else{$jump=date("d") ."/". date("m") ."/". date("Y") ; $jump = $jump; }
if ($jump == ""){$jump=date("d") ."/". date("m") ."/". date("Y") ; }
/*
function jump_daythai($cal_format){
$smonth = array("","ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.");
$arr_day = explode("/",$cal_format) ;
$mm = (int)$arr_day[1] ;
$thyy = (int)$arr_day[2] + 543 ;
$daythai = (int)$arr_day[0] ." ". $smonth[$mm] ." ". $thyy ;
return $daythai ;
} ################# function jump_daythai($cal_format){
*/
?>
<HTML>
<HEAD><TITLE>ระบบจองห้องประชุม</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="../../common/style.css" rel="stylesheet" type="text/css">
<LINK href="../../common/tab_style.css" rel="stylesheet" type="text/css" />
<SCRIPT language="javascript" src="../../common/popcalendar.js"></SCRIPT>
<SCRIPT language="javascript" src="../../common/xmlhttp.js"></SCRIPT>
<SCRIPT type="text/javascript" src="../../common/tabber.js"></SCRIPT>
<script >
var xalert='<?=$xalert?>';
function openalert(){
var H=400;
var W=900;
H= (H > screen.height -100)? screen.height-100 : H;
var winleft = (screen.width - W) / 2;
var winup = (screen.height - H) / 2;
winProp = 'width='+W+',height='+H+',left='+winleft+',top=' +winup+',scrollbars=auto,resizable' + ',status=yes'
Win = window.open('alert.php', 'alert', winProp)
if (parseInt(navigator.appVersion) >= 4)
{
// win.focus();
//window.opener.focus()
}
}
</script>
<STYLE type=text/css>
BODY {
OVERFLOW: scroll; OVERFLOW-X: hidden
}
.DEK {
POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 200;
}
</STYLE>
</HEAD>
<BODY topmargin="0" bgcolor="#EEEEEE">
<?
$title_label = "ระบบจองห้องประชุม";
include "header.php";
include "../../common/tag_alt.txt";
include "menu_bar.php";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" align="center" valign="top">
<?
$csql = " SELECT * FROM meeting_reserve ";
include("_calendar.php");
?></td>
<td colspan="3" valign="top">เลือกรูปแบบการแสดงผล [แบบตาราง] [<a href="reserve_list.php?jump=<?=$jump?>">แบบรายการ</a>] <br>
<br>
<?
/*
$sql = " SELECT daterent, count(refid) as countnm FROM meeting_reserve
where daterent > DATE_SUB( NOW() , INTERVAL 1 MONTH)
AND admin_confirm < 30
GROUP BY daterent ORDER BY daterent desc ";
$query = mysql_query($sql);
while ($rs = mysql_fetch_assoc($query)){
$nonm++;
$carendardd =convert_mysql2carendar($rs[daterent]) ;
echo " <br> $nonm) วันที่ ". convert_mysql2th($rs[daterent]) ." จำนวนการใช้ห้องประชุมทั้งสิ้น <a href='main.php?jump=$carendardd'>$rs[countnm] รายการ </a> ";
} */
#main.php?jump=16/03/2009
?> <?
$nowdatemysql = convert_2mysql($jump) ;
$sql = "SELECT rid,refid, rname, rdetail, rfloor, rsize, rrent, admin_only, meeting_reserve.daterent, meeting_reserve.time_start,
meeting_reserve.time_end, meeting_reserve.contactpoint, meeting_reserve.contactpointtel,
meeting_reserve.meeting_topic, meeting_reserve.meeting_chairman, meeting_reserve.meeting_person ,
admin_confirm , statusname,staff_regis
FROM meeting_room
LEFT JOIN meeting_reserve ON rid = meeting_reserve.roomid
INNER JOIN meeting_status ON admin_confirm = statusid
WHERE
meeting_reserve.daterent = '$nowdatemysql' ";
$result = mysql_query($sql) ;
while ($rs = mysql_fetch_assoc($result)){
$sql="Select org_staffgroup.groupname ,org_groupmember.gid FROM org_groupmember Inner Join epm_staff ON org_groupmember.staffid = epm_staff.staffid Inner Join org_staffgroup ON org_staffgroup.gid = org_groupmember.gid where epm_staff.staffid = $rs[staff_regis]";
$my_query=mysql_query($sql);
$xrow=@mysql_fetch_array($my_query);
$groupname= $xrow['groupname'];
$roomid = $rs[rid] ;
$xroomid = $rs[rid] ;
$refid = $rs[refid] ;
$groupid[$roomid]=$xrow['gid'];
$arr_timestart = explode(":" , $rs[time_start] ) ;
$arr_timeend = explode(":" , $rs[time_end] ) ;
$starthh = $arr_timestart[0] ; $startmin = $arr_timestart[1] ;
$endhh = $arr_timeend[0] ; $endmin = $arr_timeend[1] ;
$arr_roomref[$roomid] = $arr_roomref[$roomid] .",". $refid ;
$arr_starthh[$roomid][$refid] = $starthh ; $arr_startmin[$roomid][$refid] = $startmin ;
$arr_endhh[$roomid][$refid] = $endhh ; $arr_endmin[$roomid][$refid] = $endmin ;
$arr_confirm[$roomid][$refid] = $rs[admin_confirm] ;
if($_SESSION[session_staffid]==""){
$arr_meetingtopic[$xroomid][$refid] = "<strong>หน่วยงาน :</strong>".$groupname."<br /><strong>หัวข้อ :</strong>".$rs[meeting_topic] ."<br> <strong>ประธานการประชุม :</strong>". $rs[meeting_chairman];
}else{
$arr_meetingtopic[$xroomid][$refid] = "<strong>หน่วยงาน :</strong>".$groupname."<br /><strong>หัวข้อ :</strong>".$rs[meeting_topic] ."<br> <strong>ประธานการประชุม :</strong>". $rs[meeting_chairman] ." <br> <strong>contactpoint :</strong>". $rs[contactpoint]."<br /><strong>โทรศัพท์ :</strong>".$rs[contactpointtel];
}
} ###### END while ($rs = mysql_fetch_assoc($result)){
####################################################################
$sql = " SELECT * FROM meeting_status ";
$result = mysql_query($sql) ;
while ($rs = mysql_fetch_assoc($result)){
$arr_colorselect[$rs[statusid]] = $rs[statuscolor] ;
} ######### while ($rs = mysql_fetch_assoc($result)){
####################################################################
$sql = " SELECT rid,rname,rdetail,rfloor,rsize,rrent,rper,admin_only FROM meeting_room ";
$result = mysql_query($sql) ;
?>
<table width="99%" border="0" align="center" style="border-collapse:collapse;border:#666 solid 1px;" bgcolor="#666666">
<tr bgcolor="#466A8E" class="headerTB_white" >
<td width="6%" rowspan="2" align="center" >จองห้อง<br>
ประชุม</td>
<td width="16%" rowspan="2" align="center" bgcolor="#466A8E" style="border-left:#FFF solid 1px;"><strong>ห้องประชุม</strong></td>
<td colspan="10" style="border:#FFF solid 1px;" align="center"><strong>สถานะการใช้งานห้องประชุมวันที่
<?=jump_daythai($jump)?>
</strong></td>
</tr>
<tr bgcolor="#466A8E" class="ptext_w" >
<td align="center" style="border-left:#FFF solid 1px;"> 8.00-9.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 9.00-10.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 10.00-11.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 11.00-12.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 12.00-13.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 13.00-14.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 14.00-15.00 </td>
<td align="center" style="border-left:#FFF solid 1px;"> 15.00-16.00</td>
<td align="center" style="border-left:#FFF solid 1px;">16.00-17.00</td>
<td align="center" style="border-left:#FFF solid 1px;">17.00-18.00</td>
</tr>
<?
while ($rs= mysql_fetch_assoc($result)){
$nonm++;
if ($bgcolor1 == "DDDDDD"){ $bgcolor1 = "EFEFEF" ; } else {$bgcolor1 = "DDDDDD" ;}
$roomid = $rs[rid] ;
$xroomid = $rs[rid] ;
$arr001 = $arr_starthh[$roomid] ;
$xroomname = $rs[rname] ;
while (list ($xrefid, $val) = @each($arr001)) { ########## หาว่าห้อง $roomid มีการประชุมกี่โมง
# echo " ============= ห้อง $roomid ลำดับ(key) $xrefid, เวลา $val <br> ";
$admin_confirm = $arr_confirm[$roomid][$xrefid] ;
$xtimestart = (int)$arr_starthh[$roomid][$xrefid] ;
$xtimeend = (int)$arr_endhh[$roomid][$xrefid] ;
$xtimestart_min = (int)$arr_startmin[$roomid][$xrefid];
$xtimeend_min = (int)$arr_endmin[$roomid][$xrefid];
//echo "|||||||||||||||||||||||$xtimestart_min == $xtimeend_min<br>";
//echo "<hr>";
// echo "::::".$xtimestart." , $xtimestart_min ".$xtimeend." , $xtimeend_min ::<br>";
$topicxx = $arr_meetingtopic[$xroomid][$xrefid] ; ########### ตั้งค่าสำหรับ popup
$temp_time_end = "";
// if($xtimestart_min > 0 or $xtimeend_min > 0) // กรณีมีเศษเป็นนาที
$temp_sm = cal_time_persen($xtimestart_min); // หาเปอร์เซ็นของเวลาเริ่มต้น
// หา start loop เริ่มต้นของตัวแปร
if($temp_sm <= 25){$start_loop = 0;}else if($temp_sm > 25 and $temp_sm <= 50){ $start_loop = 1;}else if($temp_sm > 50 and $temp_sm <= 75){ $start_loop = 2; }else if($temp_sm > 75 and $temp_sm <= 100){ $start_loop = 3;}
if($xtimeend_min > 0){ // หา end loop
$temp_em = cal_time_persen($xtimeend_min); // หาเปอร์เซ็นของเวลาสิ้นสุด
if($temp_em <= 25){ $end_loop = 1;}else if($temp_em > 25 and $temp_em <= 50){ $end_loop = 2; }else if($temp_em > 50 and $temp_em <= 75){ $end_loop = 3;}else if($temp_em > 75 and $temp_em <= 100){ $end_loop = 4;}
}else{
$end_loop = 4;
} // end if($xtimeend_min > 0){
if($xtimeend_min > 0){ $temp_time_end = $xtimeend+1; }else{ $temp_time_end = $xtimeend;} // กรณีเวลาสิ้นสุดมีเศษนาทีให้บวกเพิ่มไปอีก 1
$n = 0; // เช็ค loop
$temp_check_loop = $temp_time_end - $xtimestart; // เช็คว่าจำนวน loop ทั้งหมดมีเท่าไหร่
//echo "$xtimestart == $temp_time_end<br>";
for($j = $xtimestart ; $j < $temp_time_end ; $j++){
$colorselect = $arr_colorselect[$admin_confirm] ;
// $onclick = ($admin_confirm == 10 && $session_apppermit[$m_id ][10] == "on")?
$onclick = ($session_apppermit[$m_id ][10] == "on" || trim($groupid[$xroomid])==trim($_SESSION[session_org]))?
"onclick =\"javascript:window.open('reserve_confirm.php?roomid=&jump=$jump&editid=$xrefid' , '_self')\" style='cursor:hand'" : "" ;
//"onclick =\"\" style='cursor:hand'"
$n++;
if($n == 1){ // loop แรกเป็นเวลาเริ่มต้น
for($k = $start_loop ; $k < 4; $k++){
$varbgtmp = "bgcolor_c" . $j."_". $k; $$varbgtmp = "bgcolor='$colorselect'" ; ##### กำหนดสีให้ตัวแปร
// echo "$j _ $k == $colorselect<br>";
eval("\$varbgtmp = \"$varbgtmp\";"); $varbg = $$varbgtmp ;
if ($editid == $xrefid ){ $arrval[$xroomid]["$j"]["$k"] = "||||||||"; }
$arralt[$xroomid]["$j"]["$k"] = "onmouseout=kill() onmouseover=\"popup(' $topicxx ','white')\"; $onclick " ; ## สำหรับ popup
}// end for
} else if($n == $temp_check_loop){ // เช็คว่าเป็น loop สุดท้าย
for($k = 0 ; $k < $end_loop; $k++){
$varbgtmp = "bgcolor_c" . $j."_". $k; $$varbgtmp = "bgcolor='$colorselect'" ; ##### กำหนดสีให้ตัวแปร
eval("\$varbgtmp = \"$varbgtmp\";"); $varbg = $$varbgtmp ;
if ($editid == $xrefid ){ $arrval[$xroomid]["$j"]["$k"] = "||||||||"; }
$arralt[$xroomid]["$j"]["$k"] = "onmouseout=kill() onmouseover=\"popup(' $topicxx ','white')\"; $onclick" ; ## สำหรับ popup
}// end for
}else{
for($k = 0 ; $k < 4; $k++){
$varbgtmp = "bgcolor_c" . $j."_". $k; $$varbgtmp = "bgcolor='$colorselect'" ; ##### กำหนดสีให้ตัวแปร
eval("\$varbgtmp = \"$varbgtmp\";"); $varbg = $$varbgtmp ;
if ($editid == $xrefid ){ $arrval[$xroomid]["$j"]["$k"] = "||||||||"; }
$arralt[$xroomid]["$j"]["$k"] = "onmouseout=kill() onmouseover=\"popup(' $topicxx ','white')\"; $onclick" ; ## สำหรับ popup
}// end for
}// end if($n == 1){
// eval("\$varbgtmp = \"$varbgtmp\";"); $varbg = $$varbgtmp ;
// if ($editid == $xrefid ){ $arrval[$xroomid]["$j"] = "||||||||"; }
// $arralt[$xroomid]["$j"] = "onmouseout=kill() onmouseover=\"popup(' $topicxx ','white')\"; " ; ## สำหรับ popup
}// end for($j = $xtimestart ; $j < $temp_time_end ; $j++){
// for ($ii = $xtimestart ; $ii < $xtimeend ; $ii++){ ########## Start ทราบเวลาเิริ่มและเวลาจบ วนหาเวลาตรงกลาง
// $colorselect = $arr_colorselect[$admin_confirm] ;
// $varbgtmp = "bgcolor_c" . $ii ; $$varbgtmp = "bgcolor='$colorselect'" ; ##### กำหนดสีให้ตัวแปร
// eval("\$varbgtmp = \"$varbgtmp\";"); $varbg = $$varbgtmp ;
//
// if ($editid == $xrefid ){ $arrval[$xroomid]["$ii"] = "||||||||"; }
// $arralt[$xroomid]["$ii"] = "onmouseout=kill() onmouseover=\"popup(' $topicxx ','white')\"; " ; ## สำหรับ popup
// } ###### END for ########## END ทราบเวลาเิริ่มและเวลาจบ วนหาเวลาตรงกลาง
} ################## END while (list ($name, $val) = each($arr001)) {
?>
<tr bgcolor="#FFFFFF" align="center" >
<td width="6%" height="25" bgcolor="#FFFFFF" style="border:#666 solid 1px;">
<!----------
<?
if($rs[admin_only] == 1){
if($session_apppermit[$m_id][$m_app10] == "on"){
?>
<a href="reserve_room.php?roomid=<?=$rs[rid]?>&jump=<?=$jump?>"><img src="../../images/document_add.gif" alt="จอง <?=$rs[rname]?>" width="20" height="20" border="0"></a>
<? }else{ echo "<font color='red'>!Lock</font>"; }
} elseif($session_apppermit[$m_id][$m_app900] == "on") { ?>
<a href="reserve_room.php?roomid=<?=$rs[rid]?>&jump=<?=$jump?>"><img src="../../images/document_add.gif" alt="จอง <?=$rs[rname]?>" width="20" height="20" border="0"></a>
<? }else{ echo "<font color='red'>!Lock</font>"; }
?>
------------------->
<?
if($rs[admin_only] == 1){
if($session_apppermit[$m_id][$m_app10] == "on"){
?>
<a href="reserve_room.php?roomid=<?=$rs[rid]?>&jump=<?=$jump?>">
<img src="../../images/document_add.gif" alt="จอง <?=$rs[rname]?>" width="20" height="20" border="0"></a>
<?
echo "<br><font color='red'>Lock for Admin</font>";
}else{ ########### END if($session_apppermit[$m_id][$m_app10] == "on"){
echo "<font color='red'>Lock</font>";
} ########### END if($session_apppermit[$m_id][$m_app10] == "on"){
}else{
?>
<a href="reserve_room.php?roomid=<?=$rs[rid]?>&jump=<?=$jump?>">
<img src="../../images/document_add.gif" alt="จอง <?=$rs[rname]?>" width="20" height="20" border="0"></a>
<?
} ############ END if($rs[admin_only] == 1){
?>
</td>
<td width="16%" height="25" align="left" bgcolor="#FFFFFF" style="border:#666 solid 1px;">
ชื่อห้อง : <?=$rs[rname]?><br/>
ชั้น : <?=$rs[rfloor];?><br/>
ขนาดความจุห้อง : <?=$rs[rsize]?><br/>
ค่าเช่าห้อง : <?=$rs[rrent]?> บาท/<? if($rs[rper]==0){echo"ชั่วโมง";}elseif($rs[rper]==1){echo"วัน";}
?><br/>
</td>
<td width="6%" style="border:#666 solid 1px;padding:0 0;">
<table width="100%" style="margin:0 0;" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c8_0?> <?=$arralt[$xroomid]["8"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c8_1?> <?=$arralt[$xroomid]["8"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c8_2?> <?=$arralt[$xroomid]["8"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c8_3?> <?=$arralt[$xroomid]["8"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["8"]?>
</td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;" >
<table style="margin:0 0;" width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c9_0?> <?=$arralt[$xroomid]["9"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c9_1?> <?=$arralt[$xroomid]["9"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c9_2?> <?=$arralt[$xroomid]["9"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c9_3?> <?=$arralt[$xroomid]["9"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["9"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c10_0?> <?=$arralt[$xroomid]["10"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c10_1?> <?=$arralt[$xroomid]["10"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c10_2?> <?=$arralt[$xroomid]["10"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c10_3?> <?=$arralt[$xroomid]["10"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["10"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c11_0?> <?=$arralt[$xroomid]["11"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c11_1?> <?=$arralt[$xroomid]["11"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c11_2?> <?=$arralt[$xroomid]["11"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c11_3?> <?=$arralt[$xroomid]["11"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["11"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c12_0?> <?=$arralt[$xroomid]["12"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c12_1?> <?=$arralt[$xroomid]["12"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c12_2?> <?=$arralt[$xroomid]["12"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c12_3?> <?=$arralt[$xroomid]["12"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["12"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c13_0?> <?=$arralt[$xroomid]["13"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c13_1?> <?=$arralt[$xroomid]["13"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c13_2?> <?=$arralt[$xroomid]["13"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c13_3?> <?=$arralt[$xroomid]["13"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["13"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c14_0?> <?=$arralt[$xroomid]["14"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c14_1?> <?=$arralt[$xroomid]["14"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c14_2?> <?=$arralt[$xroomid]["14"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c14_3?> <?=$arralt[$xroomid]["14"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["14"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c15_0?> <?=$arralt[$xroomid]["15"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c15_1?> <?=$arralt[$xroomid]["15"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c15_2?> <?=$arralt[$xroomid]["15"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c15_3?> <?=$arralt[$xroomid]["15"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["15"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c16_0?> <?=$arralt[$xroomid]["16"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c16_1?> <?=$arralt[$xroomid]["16"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c16_2?> <?=$arralt[$xroomid]["16"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c16_3?> <?=$arralt[$xroomid]["16"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["16"]?></td>
<td width="8%" style="border:#666 solid 1px;padding:0 0;"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td <?=$bgcolor_c17_0?> <?=$arralt[$xroomid]["17"]["0"]?> width="25%"> </td>
<td <?=$bgcolor_c17_1?> <?=$arralt[$xroomid]["17"]["1"]?> width="25%"> </td>
<td <?=$bgcolor_c17_2?> <?=$arralt[$xroomid]["17"]["2"]?> width="25%"> </td>
<td <?=$bgcolor_c17_3?> <?=$arralt[$xroomid]["17"]["3"]?> width="25%"> </td>
</tr>
</table>
<?=$arrval[$xroomid]["17"]?></td>
</tr>
<?
for ($ii = 1 ; $ii < 24 ; $ii++){
for($m = 0 ; $m < 4; $m++){
$varbgtmp = "bgcolor_c" . $ii."_".$m ;
$$varbgtmp = "" ;
} //end
}// end for ($ii = 1 ; $ii < 24 ; $ii++){
} ################## END while ($rs= mysql_fetch_assoc($result)){
?>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21%"><strong>สถานะการจองห้องประชุม</strong></td>
<td width="3%" bgcolor="#FFFFFF"> </td>
<td width="19%">ห้องประชุมว่าง</td>
<td width="3%" bgcolor="#FFFF99"> </td>
<td width="23%">จองห้องประชุม</td>
<td width="3%" bgcolor="#A0C779"> </td>
<td width="28%">ผ่านยืนยันการจองโดยผู้ดูแลระบบ</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<script >
if(xalert==1){
openalert();
}
</script>
<?
//insert timeQuery
$time_end = getmicrotime();
writetime2db($timestart,$timeend);
//insert timeQuery
?>