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_bk20110816.1448.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,
epm_staff.prename,
epm_staff.staffname,
epm_staff.staffsurname,
epm_staff.title,
epm_staff.meeting_room_owner
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
Inner Join epm_staff ON meeting_reserve.staff_regis = epm_staff.staffid
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'];

	#fix array กลุ่มย่อยถายใน สนง จังหวัด
	$sub_group = array(650,651,652,653,654);

	if( in_array($rs[staff_regis],$sub_group) ){
		$groupname = "สำนักงานจังหวัดปทุมธานี โดยกลุ่มงาน ".$rs[title];
	}
	
		$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_staffname = $rs[prename].$rs[staffname]." ".$rs[staffsurname];		
		$rs_stafftitle = $rs[title];	
				
	}

	$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: "Angsana New";
	font-size: 24px;
	color: #000;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.style6 {
	font-size: 32px;
	font-weight: bold;
}

-->
</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 align="center"><span class="style6">แบบฟอร์มขอใช้ห้องประชุม</span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>เรียน&nbsp;&nbsp;<?=str_replace(" ","",trim($prosition_name).trim($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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;เนื่องด้วย 
	 <u><?=$groupname?></u>  
	 มีความประสงค์ใช้ห้องประชุม  
	 <u><?=$rs_roomname?></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">&nbsp;</TD>
                        </TR>
                        <TR>
                          <TD height="30" colspan="2"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;โดยขอใช้อุปกรณ์โสต ดังนี้ </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' and reserve_id='$index'  ";
							$query=mysql_query($sql);
							list($accessory)=mysql_fetch_row($query);
							if($accessory==0){
						  ?>
						<nobr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						[&nbsp;&nbsp;&nbsp;]&nbsp;</nobr>
						<?php }else{ ?>
						<nobr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						[&nbsp;/&nbsp;]&nbsp; </nobr>
						<? }?>						</TD>
                          <TD width="71%"  ><?=$rs1[accname]?></TD>
                        </TR>
<?
}


$sql = " SELECT * FROM meeting_room_accessories WHERE rid='$rs_roomid' ";
	$result = mysql_query($sql) ; 
	$nrows = mysql_num_rows($result);
	if ($nrows) {
		while ($rs_room= mysql_fetch_assoc($result)){ 
			$nonm++;
			//echo "<li> $rs_room[accname] </li>";
			?>
		  <TR>
			  <TD width="6%" align="center">						  
			<nobr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			[&nbsp;/&nbsp;]&nbsp;</nobr>
			</TD>
			  <TD width="71%"  ><?=$rs_room[accname]?></TD>
			</TR>
			<?
		}
	}
?>
    </TABLE>	</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จากการตรวจสอบเบื้องต้นในเวลาดังกล่าวไม่มีการใช้ห้องประชุม </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จึงเรียนมาเพื่อโปรดพิจารณาอนุญาต</td>
        </tr>
      <tr>
        <td width="76%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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" nowrap="nowrap" ><nobr>&nbsp;
              <?="นายเรืองศักดิ์ ผดุงศิลป์"?>
			  &nbsp;
              </td>
            <td width="1px">)</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"><?="หัวหน้าฝ่ายอำนวยการ"?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"><!--<?=$rs_stafftitle?>--></td>
      </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ความเห็น&nbsp;&nbsp;<?=$prosition_name." ". $province_name?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img width="13" height="12" src="print_report_clip_image001.gif" /> อนุญาตให้ใช้ห้องประชุม</td>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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="24%" align="center"><table  height="20px" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1px" ><!--(--></td>
            <td>
            <?php /*?><td class="boxline" nowrap="nowrap" >&nbsp;
                <nobr><?="นายเรืองศักดิ์ ผดุงศิลป์"?><?php */?>
              &nbsp;</td>
            <td width="1px"><!--)--></td>
          </tr>
        </table></td>
        <td width="38%">&nbsp;</td>
        <td width="24%" align="center"  >
          <table  height="20px" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="1px" >(</td>
              <td class="boxline" nowrap="nowrap" ><nobr>&nbsp;<?="นาย".$name?>&nbsp;</td>
              <td width="1px">)</td>
            </tr>
          </table>           </td>
      </tr>
      <tr>
        <td align="center"><?php /*?><?="หัวหน้าฝ่ายอำนวยการ"?><?php */?></td>
        <td>&nbsp;</td>
        <td align="center" nowrap="nowrap"><?=$prosition_name.str_replace("ปทุมธานี","",$province_name)?>ปฏิบัติราชการแทน<br> ผู้ว่าราชการจังหวัดปทุมธานี
</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td></td>
      </tr>
    </table></td>
  </tr>
</table>
</body >
</html>
<?
//insert timeQuery
 $time_end = getmicrotime();
  writetime2db($timestart,$timeend);
//insert timeQuery
?>

Anon7 - 2021