|
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_eoffice/application/meetingroom/ |
Upload File : |
<?
session_start();
include("../../config/config.inc.php");
include("../../common/function.php");
//insert timeQuery
include("../../common/common_system.inc.php");
$ApplicationName="metting";
$time_start = getmicrotime();
//insert timeQuery
//============================================================================
// Get string to show reserve detail
// @param $day a reserve day
// @param $month a reserve month
// @param $year a reserve year
// @param $room_id a room id reserve
// @return $res return a reserve detail at day-month-year or room id
//============================================================================
function getDetail($day,$month,$year, $room_id) { // Query for non workday
$joindate = $year."-".sprintf("%02d",$month)."-".$day;
if ($room_id) { $sql = "SELECT * FROM meeting_reserve WHERE daterent='$joindate' AND roomid='$room_id'"; }
else { $sql = "SELECT * FROM meeting_reserve WHERE daterent='$joindate'"; }
$query = mysql_query($sql) or die(mysql_error());
$nrows = mysql_num_rows($query);
while($rsz = mysql_fetch_assoc($query)) {
$sql="Select org_staffgroup.groupname 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 = $rsz[staff_regis]";
$my_query=mysql_query($sql);
list($groupname)=mysql_fetch_row($my_query);
$i++;
$time1 = explode(":",$rsz[time_start]);
$time2 = explode(":",$rsz[time_end]);
$time = "<strong>".(int)$time1[0].".".$time1[1]." - ".(int)$time2[0].".".$time2[1]." น.</strong>";
$sss = "SELECT * FROM meeting_status WHERE statusid=$rsz[admin_confirm]";
$qqq = mysql_query($sss);
$rrr = mysql_fetch_assoc($qqq);
$images = " <img src=../../images/$rrr[statusimg] /><br/>";
$ss = "SELECT * FROM meeting_room WHERE rid=$rsz[roomid]";
$qq = mysql_query($ss);
$rr = mysql_fetch_assoc($qq);
if ($rr) { $roomname ="<strong>ห้องประชุม : ".$rr[rname]."</strong><br/>"; }else { $roomname ="<strong>ไม่ระบุห้องประชุม</strong><br/>"; }
$res .="$time $images $roomname <b>หน่วยงาน : </b>$groupname<br/> <b>หัวข้อการประชุม : </b>$rsz[meeting_topic]<br/> <b>ประธานที่ประชุม : </b>$rsz[meeting_chairman]<br/> <strong>ค่าธรรมเนียม :</strong>". number_format($rsz[cost_request],2) ."บาท<br> <b>ผู้ประสานงาน : </b>$rsz[contactpoint]<br/> <b>เบอร์โทรผู้ประสานงาน : </b>$rsz[contactpointtel]<br/><b>จำนวนผู้เข้าร่วมประชุม : </b>$rsz[meeting_person] <b>คน</b>";
if (($i!=$nrows)) { $res .= "<br/><br/>\n"; } else { $res .= "<br/>\n"; }
}
return $res;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<LINK href="../../common/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
BODY {
OVERFLOW: scroll; OVERFLOW-X: hidden;background-color: #ffffff;
}
.DEK {
POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 200;
}
</style>
<title>รายละเอียดการใช้ห้อง</title>
</head>
<body>
<table align="center" border="0">
<tr>
<td>
<?= getDetail($day,$_GET[month],$_GET[year], $_GET[room_id]) ?>
</td>
</tr>
</table>
</body>
</html>
<?
//insert timeQuery
$time_end = getmicrotime();
writetime2db($timestart,$timeend);
//insert timeQuery
?>