|
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 : /home/pathumthani_integration/integration/application/labor/ |
Upload File : |
<? session_start() ;
//header("Content-Type: text/html; charset=windows-874");
set_time_limit(0) ;
include_once("../../config/config_epm.inc.php");
include_once("manage_user.inc.php");
?>
<!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=tis-620" />
<title><?=$title_name?></title>
<script language="javascript">
function mOvr(src,clrOver){
if (!src.contains(event.fromElement)) src.bgColor = clrOver;
}
function mOut(src,clrIn){
if (!src.contains(event.toElement)) src.bgColor = clrIn;
}
</script>
<style type="text/css">
<!--
A:link {
FONT-SIZE: 12px;color: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
.style1 {color: #FF0000}
.style2 {font-size: 24px}
.h_menu {color:#FF9900}
-->
.bg_th{
background-image:url(images/horiz-bg.png);
background-repeat:repeat-x;
background-color:#305086;
font-weight:bold;
color:#FFFFFF;
text-align:center;
}
.bg_th1{
background-repeat:repeat-x;
background-color:#305086;
font-weight:bold;
color:#FFFFFF;
text-align:center;
}
</style>
<script language=JavaScript>
function Conf(object) {
if (confirm("แน่ใจว่าจะลบข้อมูล")==true) {
return true;
}
return false;
}
function CheckIsIE()
{
if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') { return true;}
else { return false; }
}
function PrintThisPage()
{
if (CheckIsIE() == true)
{
parent.iframe1.focus();
parent.iframe1.print();
}
else
{
window.frames['iframe1'].focus();
window.frames['iframe1'].print();
}
}
</script>
</head>
<body>
<?
//include("header.php");
if($_GET['runid_del']){
mysql_query("DELETE FROM pathumthani_integration.labor_master_system WHERE system_id='".$_GET['runid_del']."' ");
//mysql_query("DELETE FROM pathumthani.da_deprecrate WHERE type_id='".$_GET['type_id_del']."' ");
}
?>
<img src="images/unpublish_f2.png" width="30" height="30" border="0" align="absmiddle" /><strong style="color:#000033; font-size:18px;"> ข้อมูลประเภทการนำเข้าของหน่วยงาน</strong><br />
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#B4B4B4">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF">
<p align="center"><strong> </strong></p>
<!--<script language="JavaScript" src="js/daily_popcalendar.js" type="text/javascript"></script>
<script language="JavaScript" src="js/displayelement.js" type="text/javascript"></script>-->
<form id="form1" name="form1" method="post" action="" >
<table width="90%" border="0" align="center">
<tr>
<td width="65%" ><strong>เลือกข้อมูลประเภทการนำเข้าของหน่วยงาน : </strong>
<select name="system_id" id="system_id" onChange="window.location='?p=<?=$_GET['p']?>&system_id='+this.options[this.selectedIndex].value">
<option value="">ข้อมูลประเภทการนำเข้าของหน่วยงานทั้งหมด</option>
<?
$strSQL_22 = "SELECT *
FROM labor_master_system
where parent_id='0'
";
$rsConn_22 = mysql_db_query($dbname,$strSQL_22);
while($Result_22 = mysql_fetch_assoc($rsConn_22)){
?>
<option value="<?=$Result_22['system_id']?>" <? if($_GET['system_id']==$Result_22['system_id']){ echo "selected"; } ?>>
<?=$Result_22['system_name']?>
</option>
<?
}
?>
</select>
<td align="right">
<a href="?p=labor_base_system_keyin&system_type=0&system_id=0"><img src="images/add.png" alt="เพิ่มข้อมูลประเภทการนำเข้าของหน่วยงาน" title="เพิ่มข้อมูลประเภทการนำเข้าของหน่วยงาน" border="0" align="absmiddle" /></a>
<a href="?p=labor_base_system_keyin&system_type=0&system_id=0"> เพิ่มข้อมูลประเภทการนำเข้าของหน่วยงาน</a></td>
</tr>
</table>
<table width="90%" border="0" align="center" bgcolor="#EEEEEE" cellpadding="3" cellspacing="1">
<tr>
<td width="7%" align="center" class="bg_th"><strong>ลำดับที่</strong></td>
<!--<td class="bg_th" width="170" align="center"><strong>รหัสตำแหน่งงาน</strong></td>-->
<td class="bg_th" align="center"><strong>ชื่อประเภทการนำเข้าของหน่วยงาน</strong></td>
<td class="bg_th" width="80" align="center"><strong>การจัดการ</strong></td>
</tr>
<?
function create_report($arr,$par){
global $dbname,$a;
$a++;
//$color = ( $a % 2 == 0 ) ? "#EEEEEE" : "#FFFFFF" ;
$color = "#FFFFFF";
?>
<tr bgcolor="<?=$color?>">
<td align="center"><?=$a?></td>
<?
if($arr[$par]["parent_id"]==0){
?>
<?php /*?><td align="center"><?=$arr[$par]["position_type_id"]?></td><?php */?>
<td><?=$arr[$par]["system_name"]?></td>
<?
}else{
?>
<?php /*?><td align="right"> <img src="img/join.gif" width="16" height="16" border="0" align="absmiddle" /> <?=$arr[$par]["position_type_id"]?> </td><?php */?>
<td> <img src="img/join.gif" width="16" height="16" border="0" align="absmiddle" /> <?=$arr[$par]["system_name"]?></td>
<? }?>
<td align="right">
<?
if($arr[$par]["parent_id"]==0){
?>
<a href="?p=labor_base_system_keyin&system_id=<?=$arr[$par]["system_id"]?>&system_type=<?=$arr[$par]["system_type"]?>"><img src="img/icon-add.png" alt="เพิ่มชื่อประเภทการนำเข้าของหน่วยงาน" title="เพิ่มชื่อประเภทการนำเข้าของหน่วยงาน" width="16" height="16" border="0" align="absmiddle" /></a>
<? }?>
<a href="?p=labor_base_system_keyin&system_id=<?=$arr[$par]["system_id"]?>&system_type=<?=$arr[$par]["system_type"]?>&edit=1"><img src="img/icon-write.png" alt="แก้ไข" title="แก้ไข" width="16" height="16" border="0" align="absmiddle" /></a>
<a href="?p=<?=$_GET['p']?>&runid_del=<?=$arr[$par]["system_id"]?>&type_id_del=<?=$arr[$par]["system_type"]?>" onClick="return Conf(this)"><img src="img/icon-delete.png" alt="ลบ" title="ลบ" width="16" height="16" border="0" align="absmiddle" /></a> </td>
<?
$strSQL_9 = "SELECT *
FROM labor_master_system
WHERE parent_id ='".$par."'
";
$rsConn_9 = mysql_db_query($dbname,$strSQL_9);
//echo $strSQL_9;
while($Result_9 = mysql_fetch_assoc($rsConn_9)){
create_report($arr,$Result_9['system_id']);
}
}
?>
<?
$strSQL_1 = "SELECT *
FROM labor_master_system
order by system_id
";
//echo $strSQL_1;
$rsConn_1 = mysql_db_query($dbname,$strSQL_1);
$a=0;
while ( $Result_1 = mysql_fetch_assoc($rsConn_1)) {
$arrAll[$Result_1['system_id']]=$Result_1;
}
$strSQL_11 = "SELECT *
FROM labor_master_system
";
if($_GET['system_id']){
$strSQL_11.=" WHERE system_id='".$_GET['system_id']."' ";
}
//echo $strSQL_1;
$rsConn_11 = mysql_db_query($dbname,$strSQL_11);
while ( $Result_11 = mysql_fetch_assoc($rsConn_11)) {
if($Result_11['parent_id']=='0'){
$parent[]=$Result_11['system_id'];
}
}
//print_r($parent);
$cot=count($parent);
for($i=0;$i<$cot;$i++){
create_report($arrAll,$parent[$i]);
}
?>
</tr>
</table>
</form>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>