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/reserve_setting.php
<?
//include("chk_permission.php");
session_start();
include("../../config/config.inc.php");
include("../../common/function.php");
$phpfile = "reserve_setting.php" ; 


//insert timeQuery
include("../../common/common_system.inc.php"); 
$ApplicationName="metting"; 
$time_start = getmicrotime();  
//insert timeQuery



##meeting_reserve 
################ HARD FIX
#$_SESSION[session_staffid] = 49 ;
$user=$_SESSION[session_staffid];
################

?>
<link href="../../common/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
BODY {
OVERFLOW: scroll; OVERFLOW-X: hidden;background-color: #EEEEEE;
}
.DEK {
POSITION: absolute; VISIBILITY: hidden; Z-INDEX: 200;
}
</style>
	<SCRIPT LANGUAGE="JavaScript"><!--
function Gomain(){
	window.location="main.php";
	}
function checkempty() {
checknotempty="";
 if(document.post.c1.checked==true) {checknotempty=true}
 if(document.post.c2.checked==true) {checknotempty=true}
 if(document.post.c3.checked==true) {checknotempty=true}
 if(document.post.c4.checked==true) {checknotempty=true}
 if(document.post.c5.checked==true) {checknotempty=true}
 if(document.post.c6.checked==true) {checknotempty=true}

 if(checknotempty==""){document.post.setting[0].checked='ture';normaldisabled();}
// alert(checknotempty);

}

function normaldisabled() {
 if(document.post.setting[0].checked==true) {
document.post.c1.disabled=true;
document.post.c2.disabled=true;
document.post.c3.disabled=true;
document.post.c4.disabled=true;
document.post.c5.disabled=true;
document.post.c6.disabled=true;
}
}

function normalanabled() {
 if(document.post.setting[1].checked==true) {
document.post.c1.disabled=false;
document.post.c2.disabled=false;
document.post.c3.disabled=false;
document.post.c4.disabled=false;
document.post.c5.disabled=false;
document.post.c6.disabled=false;

checkall();

}
}

function checkall() {
document.post.c1.checked=true;
document.post.c2.checked=true;
document.post.c3.checked=true;
document.post.c4.checked=true;
document.post.c5.checked=true;
document.post.c6.checked=true;
}
//--></SCRIPT>
<?
if ($_SERVER[REQUEST_METHOD] == "POST"){ 
//echo "NOW LOADING...";
//echo "<pre>";
 $sql_deloldseting="
delete from reserve_setting;  
";
$result =  mysql_query($sql_deloldseting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status) VALUES (	NULL , $session_staffid, 'std' , '$setting')
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	
	if($c1=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status) VALUES (	NULL , $session_staffid, 'c1' , '$c1')
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
	if($c2=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status) VALUES (	NULL , $session_staffid, 'c2' , '$c2')
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
	if($c3=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status ) VALUES (	NULL , $session_staffid, 'c3' , '$c3')
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
	if($c4=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status) VALUES (	NULL , $session_staffid, 'c4' , '$c4' )
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
	if($c5=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status  ) VALUES (	NULL , $session_staffid, 'c5' , '$c5' )
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
	if($c6=="1"){
	$sql_insertsetting="
	INSERT INTO reserve_setting ( id , staffid , colump , status ) VALUES (	NULL , $session_staffid, 'c6' , '$c6' )
	";
	$result =  mysql_query($sql_insertsetting)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
	}
		$msg.= "เปลี่ยนแปลงข้อมูลเรียบร้อย";
		include('../document/msg_box.php');
		echo "<meta http-equiv='refresh' content='1;url=$PHP_SELF?page=$page'>" ;
	exit;
//echo "</pre>";
}
?>
<?
include "../../common/tag_alt.txt";   
$title_label = "ระบบจองห้องประชุม";
include "header.php";   
include "menu_bar.php";  
?>
<form action="" method="post" enctype="multipart/form-data" name="post" id="post">
<br />
	<table width="72%" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<td align="right" bgcolor="#999999">
<table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td colspan="6" align="left" background="../../images/bg_tr_blue.gif"  class="executive_bg">กาารปรับแต่งคอลัมน์</td>
</tr>
<?
$sql_setting_list="select * from $eoffice_select.reserve_setting";
$result =  mysql_query($sql_setting_list)or die("Query line " . __LINE__ . " error<hr>".mysql_error());
if($result){$rs_row=mysql_num_rows($result);}
while($srs = mysql_fetch_assoc($result)){
$c_select[$srs [colump]]=$srs [status];
}
?>
<tr>
	<td width="20" height="20" align="right" class="index2"><input name="setting" type="radio" value="1" onclick="normaldisabled();" <? if($c_select[std] == 1){echo "checked=checked"; } ?>  /></td>
	<? if(!$checkDB){?><script language=javascript>normaldisabled();</script><? } ?>
	<td height="20" colspan="5" align="left" class="index2">มาตรฐาน</td>
	</tr>
<tr>
	<td height="20" align="right" class="index2"><input name="setting" type="radio" value="2" onclick="normalanabled();" <? if($c_select[std] == 2){echo "checked=checked"; } ?>/></td>
	<td height="20" colspan="5" align="left" class="index2">กำหนดเอง</td>
	</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td height="20" colspan="5" align="left" class="index2"><strong>คอลัมน์</strong></td>
	</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td width="20" align="left" class="index2">
	
	<input type="checkbox" name="c1"  value="1" onclick="if(document.post.c1.checked){document.post.setting[1].checked='ture'};checkempty();" <? if($c_select[c1]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?>  />	</td>
	<td width="60" height="20" align="left" class="index2">วัน</td>
	<td width="20" align="left" class="index2"><input name="c4" type="checkbox" id="c4" onclick="if(document.post.c4.checked){document.post.setting[1].checked='ture'};checkempty();"  value="1" <? if($c_select[c4]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?>></td>
	<td align="left" class="index2">ประธานที่ประชุม</td>
	<td width="60%" height="20" align="left" class="index2">&nbsp;</td>
</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td align="left" class="index2"><input name="c2" type="checkbox" id="c2" onclick="if(document.post.c2.checked){document.post.setting[1].checked='ture'};checkempty();"  value="1" <? if($c_select[c2]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?>  /></td>
	<td height="20" align="left" class="index2">เวลา</td>
	<td width="20" align="left" class="index2"><input name="c5" type="checkbox" id="c5" onclick="if(document.post.c5.checked){document.post.setting[1].checked='ture'};checkempty();"  value="1" <? if($c_select[c5]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?>></td>
	<td align="left" class="index2">หัวข้อการประชุม</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td align="left" class="index2"><input name="c3" type="checkbox" id="c3" onclick="if(document.post.c3.checked){document.post.setting[1].checked='ture'};checkempty();"  value="1" <? if($c_select[c3]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?> /></td>
	<td height="20" align="left" class="index2">ห้อง</td>
	<td align="left" class="index2"><input name="c6" type="checkbox" id="c6" onclick="if(document.post.c6.checked){document.post.setting[1].checked='ture'};checkempty();"  value="1" <? if($c_select[c6]){echo "checked=checked"; } ?> <? if($c_select[std] == 1){echo "disabled"; } ?>/></td>
	<td align="left" class="index2">จำนวนผู้เข้าร่วมประชุม</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td align="left" class="index2">&nbsp;</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
	<td align="left" class="index2">&nbsp;</td>
	<td align="left" class="index2">&nbsp;</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
</tr>
<tr>
	<td align="right" class="index2">&nbsp;</td>
	<td align="right" class="index2">&nbsp;</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
	<td align="right" class="index2">&nbsp;</td>
	<td align="left" class="index2">&nbsp;</td>
	<td height="20" align="left" class="index2">&nbsp;</td>
</tr>


<tr>
	<td height="20" colspan="6" align="center" class="index2">&nbsp;	</td>
	</tr
><tr>
	<td height="20" colspan="6" align="center" class="index2"><HR color="#eeeeee">
<input name="submit2" type="submit" class="input" style="width:100;" value="บันทึกข้อมูล" />
		&nbsp;
		<input name="button" type="button" class="input" style="width:100;" onclick="Gomain();"  value="กลับหน้าหลัก" /></td>
	</tr>
</table>
</td>
</tr>
</table>

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

Anon7 - 2021