|
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/bin/meetingroom_bk/ |
Upload File : |
<?
//include("chk_permission.php");
session_start();
include("../../config/config.inc.php");
include("../../common/function.php");
include("var.inc.php");
################ HARD FIX
#$_SESSION[session_staffid] = 49 ;
$user=$_SESSION[session_staffid];
################
if ($jump != ""){$jump=$jump;}else{$jump=date("d") ."/". date("m") ."/". date("Y") ; $jump = $jump; }
/*
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){
*/
function cutlast2digit($strx){
$len1 = strlen($strx)-3 ;
$newval = substr($strx,0,$len1 ) ;
return $newval ;
}################# function cutlast2digit($cal_format){
function toStaffName($staffid) {
$sqlx = "SELECT staffname FROM epm_staff WHERE staffid='$staffid'";
$qx = mysql_query($sqlx) or die(mysql_error());
$rx = mysql_fetch_assoc($qx);
return $rx[staffname];
}
?>
<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>
</head>
<body topmargin="0" bgcolor="#EEEEEE">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
<tr align="center" bgcolor="#466A8E" class="headerTB_white" >
<td height="20" colspan="2" ><strong>สถานะการใช้งานห้องประชุมระหว่างวันที่
<?=jump_daythai($jump)?>
ถึงวันที่
<?
$nextdatemysql2=explode("-",$nextdatemysql);
$nextdatemysql2=array_reverse($nextdatemysql2);
$nextdatemysql2=implode("/",$nextdatemysql2);
echo jump_daythai($nextdatemysql2);
?>
</strong></td>
</tr>
<tr align="center" bgcolor="#466A8E" class="headerTB_white" >
<td width="15%" height="20" >วัน</td>
<td width="85%" height="20">รายละเอียด</td>
</tr>
<?
$sqlx = "SELECT daterent FROM meeting_reserve GROUP BY daterent";
$qx = mysql_query($sqlx) or die(mysql_error());
while($rx = mysql_fetch_assoc($qx)) {
if ($bgcolor1 == "DDDFFF"){ $bgcolor1 = "EFEFEF" ; } else {$bgcolor1 = "DDDFFF" ;}
?>
<tr bgcolor="#<?=$bgcolor1?>">
<td align="center" valign="top" bgcolor="#DDDDDD"><strong>
<?php
$nextdatemysql2=explode("-",$rx[daterent]);
$nextdatemysql2=array_reverse($nextdatemysql2);
$nextdatemysql2=implode("/",$nextdatemysql2);
echo jump_daythai($nextdatemysql2);
?>
</strong></td>
<td><?
$s = "SELECT * FROM meeting_reserve WHERE daterent = '$rx[daterent]'";
$q = mysql_query($s) or die(mysql_error());
?>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
<? while($r = mysql_fetch_assoc($q)) { ?>
<tr>
<td><strong>
<?=substr($r[time_start],0,5);?>
-
<?=substr($r[time_end],0,5);?>
น.
<?=$r[meeting_topic];?>
</strong> [
<?=$r[meeting_person];?>
คน]<br/>
<?=daythai($r[daterent]);?>
<?
$ss = "SELECT * FROM meeting_room WHERE rid=$r[roomid]";
$qq = mysql_query($ss);
$rr = mysql_fetch_assoc($qq);
echo "ห้องประชุม ".$rr[rname]." ชั้น ".$rr[rfloor]." โดย ".toStaffName($r[staff_regis])." โทร ".$r[contactpointtel];
$sss = "SELECT * FROM meeting_status WHERE statusid=$r[admin_confirm]";
$qqq = mysql_query($sss);
$rrr = mysql_fetch_assoc($qqq);
/*
echo "<br/><br/><div style=\"float:center; margin:auto;\">
<a href=reserve_room.php?roomid=$roomid&jump=$jump&editid=$r[refid]>
<img src='../../images/b_edit.png' width='16' height='16' border='0'></a>
<a href='reserve_confirm.php?roomid=$roomid&jump=$jump&editid=$r[refid]'>
<img src=\"../../images/".$rrr[statusimg]." \" border='0'/></a> ".$rrr[statusname]."</div>
";
*/
?>
<hr/>
</td>
</tr>
<? } ?>
</table></td>
</tr>
<? } ?>
</table>