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/data_xml_industry.php
<?       
session_start();
$nochecklogin= true;
header("Content-type: text/xml; charset=utf-8");
include_once("../../config/config_epm.inc.php");

function parseToXML($htmlStr) { 
	$xmlStr=str_replace('<','&lt;',$htmlStr); 
	$xmlStr=str_replace('>','&gt;',$xmlStr); 
	$xmlStr=str_replace('"','&quot;',$xmlStr); 
	$xmlStr=str_replace("'",'&#39;',$xmlStr); 
	$xmlStr=str_replace("&",'&amp;',$xmlStr); 
	return iconv("tis-620","utf-8",$xmlStr); 
} 

function sdate($v){
	$x = explode('-',$v);
	return iconv("tis-620","utf-8","¢éÍÁÙÅ ³ Çѹ·Õè ".$x[2]."/".$x[1]."/".($x[0]+543)) ;
}
//echo $_GET['num'];
echo "<markers>";
$sqlXml="SELECT
					industry_register.fname,
					industry_register.job,
					industry_register.location,
					industry_register.tambol,
					industry_register.ampur,
					industry_register.telephone,
					industry_register.gpsx,
					industry_register.gpsy,
					industry_register.muban,
					industry_register.type_id
					FROM	industry_register
					WHERE industry_register.gpsx !='' and industry_register.gpsy !=''					
					";
					if($_GET['cease'] !=""){
					$sqlXml .= ($_GET['cease'] == "1")?" AND  (industry_register.cease IS NOT NULL OR industry_register.cease!='' ) ":" AND  (industry_register.cease IS NULL OR industry_register.cease='' ) ";
					}
if($_GET['num']){
		$strSQL_3 = "SELECT *												
								FROM		industry_type
								WHERE type_id='".$_GET['num']."'
						";
		$rsConn_3 = mysql_db_query($dbname,$strSQL_3);
		$Result_3 = mysql_fetch_assoc($rsConn_3);
		
		$strSQL_3_1 = "SELECT *												
								FROM		industry_type
								WHERE parent_id='".$Result_3['runid']."'
						";
		$rsConn_3_1 = mysql_db_query($dbname,$strSQL_3_1);
		
		$str_no1='';
		while ( $Result_3_1 = mysql_fetch_assoc($rsConn_3_1)) {
				$str_no1.="'".$Result_3_1['type_id']."'".',';
		}
		$str_no1=substr($str_no1,0,strlen($str_no1)-1);
		
		if($str_no1==''){
			$sqlXml.="	and  industry_register.type_id ='-999'	";	
		}else{
			$sqlXml.="	and  industry_register.type_id IN($str_no1)	";	
		}
}
//echo $sqlXml;
$query = mysql_query($sqlXml);
while($rows = mysql_fetch_array($query)){
		$addr=$rows['location'].' '.$rows['muban'].' '.$rows['tambol'].' '.$rows['ampur'].' ¨.»·ØÁ¸Ò¹Õ '.$rows['telephone'];
		$nameP="ª×èÍâç§Ò¹ : ".$rows['fname'];
	  echo '<marker ';  
		echo 'name="'.parseToXML($nameP).'" ';
		echo 'address="'.parseToXML($addr).'" ';
		echo 'lat="' . $rows['gpsx'] . '" ';
		echo 'lng="' . $rows['gpsy'] . '" ';
		echo 'picture="picture" ';
		echo 'identify="" ';
		echo 'icon="http://123.242.173.131/pathumthani_integration/integration/application/industry/img/';
		
		
		$strSQL_32 = "SELECT *												
								FROM		industry_type
								WHERE type_id='".$rows['type_id']."'
						";
		$rsConn_32 = mysql_db_query($dbname,$strSQL_32);
		$Result_32 = mysql_fetch_assoc($rsConn_32);
		
		$strSQL_3_2 = "SELECT *												
								FROM		industry_type
								WHERE runid='".$Result_32['parent_id']."'
						";
		$rsConn_3_2 = mysql_db_query($dbname,$strSQL_3_2);
		//echo $strSQL_3_2;
		$Result_3_2 = mysql_fetch_assoc($rsConn_3_2);
		//if($str_no1==''){
		
		if($_GET['plant']){
			echo 'plant';
		}else{
			echo 'plant';
			echo ((substr($Result_3_2['type_id'],1,2)*1));
		}
		/*}else{
				echo ((substr($_GET['num'],1,2)*1));
		}*/
		echo '.png" ';
	    //echo 'identify="'.parseToXML("identify_data.php?tb=ptravel&runid=".$rows['runid']).'" ';
	  echo '/>';
  
}//end while1

echo "</markers>";

?>

Anon7 - 2021