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/industry_business.php
<? 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; text-decoration:none;
}
A:visited {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;text-decoration:none;
}
A:active {
	FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;text-decoration:none;
}
A:hover {
	FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;text-decoration:none;
}
.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;
  text-decoration: none; 
  }
  .bg_th1{
  background-repeat:repeat-x;
  background-color:#355790;
  font-weight:bold;
  color:#FFFFFF;
  text-align:center;
  }
</style>
<script src="common/gs_sortable.js"></script>
<link href="common/gs_sortable.css" />
<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"); 

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;
}

function getMonthName($num){
		$month[1]=array(id=>"1",name=>"มกราคม");
		$month[2]=array(id=>"2",name=>"กุมภาพันธ์");
		$month[3]=array(id=>"3",name=>"มีนาคม");
		$month[4]=array(id=>"4",name=>"เมษายน");
		$month[5]=array(id=>"5",name=>"พฤษภาคม");
		$month[6]=array(id=>"6",name=>"มิถุนายน");
		$month[7]=array(id=>"7",name=>"กรกฎาคม");
		$month[8]=array(id=>"8",name=>"สิงหาคม");
		$month[9]=array(id=>"9",name=>"กันยายน");
		$month[10]=array(id=>"10",name=>"ตุลาคม");
		$month[11]=array(id=>"11",name=>"พฤศจิกายน");
		$month[12]=array(id=>"12",name=>"ธันวาคม");
		
		return $month[$num][name];
}
?>
<p>
<?
		if($_POST['Submit']){
			//$letter_date = Save_date($_POST['letter_date']);		
				//echo 'sfsd';
				 $strSQL_2 = "SELECT
										Count(runid) AS chkCount,year,month,runid
										FROM	industry_business
										WHERE year='".$_POST['year']."' AND month='".$_POST['month']."' 
										GROUP  BY runid
									"; 
				$rsConn_2 = mysql_db_query($dbname,$strSQL_2);
				$Result_2 = mysql_fetch_assoc($rsConn_2);
				$checkRepeat=0;
				if($_GET['edit']==''){				
						if($Result_2['chkCount'] < 1){
							$strSQL_1_1 = "SELECT *
													FROM		industry_business_type
													WHERE parent_id='0'
													
											";
							//echo $strSQL_1_1;
							$rsConn_1_1 = mysql_db_query($dbname,$strSQL_1_1);
							while ( $Result_1_1 = mysql_fetch_assoc($rsConn_1_1)) {
								$sqlType_1="		SELECT * FROM industry_business_type WHERE parent_id='".$Result_1_1['runid']."'		";
								$rsType_1=mysql_db_query($dbname,$sqlType_1);
								while($resType_1=mysql_fetch_assoc($rsType_1)){
									$temp_newNumber='new_number'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_newCapital='new_capital'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_upNumber='up_number'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_upCapital='up_capital'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_downNumber='down_number'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_downCapital='down_capital'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_cancelNumber='cancel_number'.str_replace('.','_',$resType_1['type_id']).'A';
									$temp_cancelCapital='cancel_capital'.str_replace('.','_',$resType_1['type_id']).'A';
							$insert="
									INSERT INTO `industry_business` SET 
															`type_id`='".$resType_1['type_id']."',
															`type_business`='1',
															`month`='".$_POST['month']."',
															`year`='".$_POST['year']."',
															`new_number`='".$_POST[$temp_newNumber]."',
															`new_capital`='".$_POST[$temp_newCapital]."',
															`up_number`='".$_POST[$temp_upNumber]."',
															`up_capital`='".$_POST[$temp_upCapital]."',
															`down_number`='".$_POST[$temp_downNumber]."',
															`down_capital`='".$_POST[$temp_downCapital]."',
															`cancel_number`='".$_POST[$temp_cancelNumber]."',
															`cancel_capital`='".$_POST[$temp_cancelCapital]."',
															`update_time`=now()
													";
							//$insert=str_replace('.','_',$insert);
								echo $insert;
							mysql_query($insert);
							}
						}
						//mysql_query("INSERT INTO industry_shop (name,class_name,note)VALUES('".$_POST['class_id']."','".$_POST['class_name']."','".$_POST['note']."')");
						//mysql_query("INSERT INTO da_deprecrate (type_id,useful_life,deprecrate)VALUES('".$_POST['type_id']."','".$_POST['life_low']."','".$_POST['deprecrate_low']."')");
						//mysql_query("INSERT INTO da_deprecrate (type_id,useful_life,deprecrate)VALUES('".$_POST['type_id']."','".$_POST['life_high']."','".$_POST['deprecrate_high']."')");
						
						print"<script language='JavaScript'> alert('บันทึกข้อมูลเรียบร้อยแล้ว') </script> ";
						exit();
						print"<meta http-equiv=\"refresh\" content=\"0;URL=industry_business.php\">\n";
						exit();
						}
						else{
								$checkRepeat = 1;
						}					
				}
				else{
					//echo $Result_2['type_id'];
					if($Result_2['chkCount'] < 1 || $_GET['runid']==$Result_2['runid']){
						
						mysql_query("
									UPDATE `industry_durable` SET 
															`code`='".$_POST['code']."',
															`tambol`='".$_POST['tambol']."',
															`amphur`='".$_POST['amphur']."',
															`province`='".$_POST['province']."',
															`book_type`='".$strBookType."',
															`book_id`='".$_POST['book_id']."',
															`plantation_unit`='".$_POST['plantation_unit']."',
															`work_unit`='".$_POST['work_unit']."',
															`wah_unit`='".$_POST['wah_unit']."',
															`useful`='".$_POST['useful']."',
															`status`='".$_POST['status']."',
															`note`='".$_POST['note']."',
															`gpsx`='".$_POST['lattitude']."',
															`gpsy`='".$_POST['longtitude']."',
															`update_time`=now()
										WHERE runid='".$_GET['runid']."'
													");
					/*mysql_query("UPDATE industry_class
											SET class_id='".$_POST['class_id']."', class_name='".$_POST['class_name']."',note='".$_POST['note']."'
											WHERE runid='".$_GET['runid']."'		");				*/	
					
					
					print"<script language='JavaScript'> alert('บันทึกข้อมูลเรียบร้อยแล้ว') </script> ";
					print"<meta http-equiv=\"refresh\" content=\"0;URL=industry_durable.php\">\n";
					exit();
					}
						else{
								$checkRepeat = 1;
						}		
				}
		}
		
		
?>
<?php /*?>&nbsp;<img src="images/unpublish_f2.png" width="30" height="30" border="0" align="absmiddle" /><strong style="color:#000033; font-size:18px;">
		<?			
			if($_GET['edit']==''){
				echo "แบบฟอร์มเพิ่มข้อมูลที่ราชพัสดุ";
			}
			else{
				echo "แบบฟอร์มแก้ไขข้อมูลที่ราชพัสดุ";
			}
		?></strong><?php */?>
</p>
<script language="JavaScript" type="text/javascript">

	function CheckForm ( form ) {
		 if ( form.book_id.value == "" ) {
		 	alert("กรุณาป้อน หมายเลขของหนังสือสำคัญสำหรับที่ดิน");
			form.book_id.focus();
			return false;
		}else if(document.getElementById('txt_plantation_unit').innerHTML != ""){
			alert(" ! กรุณาระบุ เนื้อที่ (ไร่) ให้ถูกต้อง");
			document.getElementById('txt_plantation_unit').focus();
			return false;	
		}else if(document.getElementById('txt_work_unit').innerHTML != ""){
			alert(" ! กรุณาระบุ เนื้อที่ (งาน)  ให้ถูกต้อง");
			document.getElementById('txt_work_unit').focus();
			return false;	
		}else if(document.getElementById('txt_wah_unit').innerHTML != ""){
			alert(" ! กรุณาระบุ เนื้อที่ (วา)  ให้ถูกต้อง");
			document.getElementById('txt_wah_unit').focus();
			return false;	
		}
		return true;
	}		
</script>
<br />

<form id="form1" name="form1" method="post" action="" onsubmit="return CheckForm(this)">
<?
//echo 'tse'.$_GET['new_number1_1A'];
?>

<table width="99%" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr>
                <td align="center"><strong style="color:#000033; font-size:16px;">ข้อมูลเพื่อทำเครื่องชี้ภาวะเศรษฐกิจรายจังหวัด (สนง.พาณิชยกรรม จังหวัดปทุมธานี)</strong><br />
                <strong style="color:#000033; font-size:16px;">ประจำเดือน </strong>
                <?
                $strSQL_3 = "SELECT *
										FROM		industry_business
										WHERE runid IS NOT NULL
										
								";
				//echo $strSQL_1;
				$rsConn_3 = mysql_db_query($dbname,$strSQL_3);
				$Result_3 = mysql_fetch_assoc($rsConn_3);
				?>
                		<select name="month" id="month">
                                <!--<option value="">เลือกปี พ.ศ.</option>-->
                                <?
                                for($i=1;$i<=12;$i++){			
								
								?>
                                <option value="<?=$i?>" ><?=getMonthName($i)?></option>
                                <? }?>
                         </select>
                       <strong style="color:#000033; font-size:16px;">  ปี พ.ศ. </strong>
                		<select name="year" id="year">
                                <!--<option value="">เลือกปี พ.ศ.</option>-->
                                <?
                                for($i=(date('Y')+543);$i>((date('Y')+543)-100);$i--){								
								?>
                                <option value="<?=$i?>" <? if($Result_3['year']==$i){ echo "selected"; } ?>><?=$i?></option>
                                <? }?>
                         </select>
                </td>
        </tr>
</table>


<table width="99%" border="0" align="center" cellpadding="3" cellspacing="1">
				<tr>
                		<td>
                		</td>
						<td width="13%" align="left"></td>
						<td width="10%"></td>
				</tr>
		</table>
        
        <table width="99%" border="0" cellpadding="0" cellspacing="0" align="center">
        		<tr>
                		<td>&nbsp;</td>
                        <td></td>
                </tr>
        		<tr>
                		<td>ธุรกิจจดทะเบียน ประเภทห้างหุ้นส่วนจำกัด
                        </td>
                        <td align="right"><?php /*?><a href="report_year_fee_pdf.php?year=<?=$_GET['year']?>" target="_blank"><IMG src="img/pdf.gif" alt="ผลการค้นหา PDF" width="18" height="18" border="0" title="PDF" align="absmiddle"><?php */?></td>
                </tr>
        </table>
        
		<table width="99%" border="0" align="center" bgcolor="#CCCCCC" cellpadding="3" cellspacing="1" id="my_table">
        	<thead>				
				<tr class="bg_th">
				  <th width="50" rowspan="3" align="center"><strong>ลำดับที่</strong></th>
				  <th width="300" rowspan="3" align="center"><font color="#FFFFFF"><strong>ชื่อโรงงาน</strong></font></th>
				  <th colspan="8" align="center"><font color="#FFFFFF"><strong>ห้างหุ้นส่วนจำกัด</strong></font></th>
			  </tr>
				<tr class="bg_th">
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>ตั้งใหม่</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>เพิ่มทุน</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>ลดทุน</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>เลิก</strong></font></th>
			  </tr>
				<tr class="bg_th">
				  		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
						<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
				</tr>
            </thead>
            <tbody>
				<?				
				$strSQL_1 = "SELECT *
										FROM		industry_business_type
										WHERE parent_id='0'
										
								";
				//echo $strSQL_1;
				$rsConn_1 = mysql_db_query($dbname,$strSQL_1);
				$i=0;				
				while ( $Result_1 = mysql_fetch_assoc($rsConn_1)) {
						$i++;		
						$rowNumb = ($i+($board_link_num*$page)-$board_link_num);				
				?>
				<tr bgcolor="#EEEEEE">
						<td align="center"><?=(substr($Result_1['type_id'],1)*1)?></td>
						<td align="left" colspan="9"><?=$Result_1['type_name']?></td>
                </tr>
				<?						
						$sqlType="		SELECT * FROM industry_business_type WHERE parent_id='".$Result_1['runid']."'		";
						$rsType=mysql_db_query($dbname,$sqlType);
						while($resType=mysql_fetch_assoc($rsType)){
						//echo $sqlType;
						
				?>
				<tr bgcolor="#FFFFFF">
						<td align="center"><?=$resType['type_id']?></td>
						<td align="left"><?=$resType['type_name']?></td>
						<td align="center"><input name="new_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="new_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="new_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="new_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="up_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="up_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="up_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="up_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="down_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="down_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="down_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="down_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="cancel_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="cancel_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="cancel_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="cancel_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
				</tr>
				<? 
						}
				}?>
          </tbody>
          <tfoot>
				<?php /*?><tr bgcolor="#DDDDDD">
						<td colspan="8" align="right"><strong>รวม&nbsp;</strong></td>
						<td align="right"><strong><?=number_format($totalALL_CAPITAL,2)?></strong></td>
						<td align="right"><strong><?=number_format($totalALL_YEAR,2)?></strong></td>
				</tr><?php */?>
           </tfoot>
		</table>
<br>
<table width="99%" border="0" cellpadding="0" cellspacing="0" align="center">
        		<tr>
                		<td>&nbsp;</td>
                        <td></td>
                </tr>
        		<tr>
                		<td>ธุรกิจจดทะเบียน ประเภทบริษัทจำกัด
                        </td>
                        <td align="right"><?php /*?><a href="report_year_fee_pdf.php?year=<?=$_GET['year']?>" target="_blank"><IMG src="img/pdf.gif" alt="ผลการค้นหา PDF" width="18" height="18" border="0" title="PDF" align="absmiddle"><?php */?></td>
                </tr>
        </table>
        
		<table width="99%" border="0" align="center" bgcolor="#CCCCCC" cellpadding="3" cellspacing="1" id="my_table">
        	<thead>				
				<tr class="bg_th">
				  <th width="50" rowspan="3" align="center"><strong>ลำดับที่</strong></th>
				  <th width="300" rowspan="3" align="center"><font color="#FFFFFF"><strong>ชื่อโรงงาน</strong></font></th>
				  <th colspan="8" align="center"><font color="#FFFFFF"><strong>บริษัทจำกัด</strong></font></th>
			  </tr>
				<tr class="bg_th">
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>ตั้งใหม่</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>เพิ่มทุน</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>ลดทุน</strong></font></th>
				  <th colspan="2" align="center"><font color="#FFFFFF"><strong>เลิก</strong></font></th>
			  </tr>
				<tr class="bg_th">
				  		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                		<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
						<th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนราย(ราย)</strong></font></th>
                        <th width="120" align="center"><font color="#FFFFFF"><strong>จำนวนเงินทุนจดทะเบียน(บาท)</strong></font></th>
				</tr>
            </thead>
            <tbody>
				<?				
				$strSQL_1 = "SELECT *
										FROM		industry_business_type
										WHERE parent_id='0'
										
								";
				//echo $strSQL_1;
				$rsConn_1 = mysql_db_query($dbname,$strSQL_1);
				$i=0;				
				while ( $Result_1 = mysql_fetch_assoc($rsConn_1)) {
						$i++;		
						$rowNumb = ($i+($board_link_num*$page)-$board_link_num);				
				?>
				<tr bgcolor="#EEEEEE">
						<td align="center"><?=(substr($Result_1['type_id'],1)*1)?></td>
						<td align="left" colspan="9"><?=$Result_1['type_name']?></td>
                </tr>
				<?						
						$sqlType="		SELECT * FROM industry_business_type WHERE parent_id='".$Result_1['runid']."'		";
						$rsType=mysql_db_query($dbname,$sqlType);
						while($resType=mysql_fetch_assoc($rsType)){
						//echo $sqlType;
						
				?>
				<tr bgcolor="#FFFFFF">
						<td align="center"><?=$resType['type_id']?></td>
						<td align="left"><?=$resType['type_name']?></td>
						<td align="center"><input name="new_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="new_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="new_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="new_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="up_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="up_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="up_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="up_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="down_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="down_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="down_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="down_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
						<td align="center"><input name="cancel_number<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="cancel_number<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['new_number']:$_POST['code']?>" /></td>
						<td align="center"><input name="cancel_capital<?=str_replace('.','_',$resType['type_id'])?>A" type="text" id="cancel_capital<?=str_replace('.','_',$resType['type_id'])?>A" size="10" value="<?=($_POST['code']=='')?$Result_3['code']:$_POST['code']?>" /></td>
				</tr>
				<? 
						}
				}?>
          </tbody>
          <tfoot>
				<?php /*?><tr bgcolor="#DDDDDD">
						<td colspan="8" align="right"><strong>รวม&nbsp;</strong></td>
						<td align="right"><strong><?=number_format($totalALL_CAPITAL,2)?></strong></td>
						<td align="right"><strong><?=number_format($totalALL_YEAR,2)?></strong></td>
				</tr><?php */?>
           </tfoot>
		</table>
<br />
 <table width="99%" align="center" border="0" cellpadding="0" cellspacing="0">
 			<tr>
              <td align="right">&nbsp;</td>
              <td align="right">
			  		<input type="submit" name="Submit" value="บันทึก" />
                  <input type="reset" name="Submit2" value="ยกเลิก" />
				  <input type="button" name="back_main" value="ย้อนกลับ"  onclick="history.back();"/>
				</td>
              
            </tr>
 </table>
 <br>
<script type="text/javascript">
	
<!--
	var TSort_Data = new Array ('my_table', '', 'h','h','s','s','g','g');
	var TSort_Classes = new Array ('row1', 'row2');
	tsRegister();
// -->
</script> 
</form>
</body>
</html>

Anon7 - 2021