403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.139.94.189
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/product/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/product/product_search.php
<?php
import_request_variables('pG', 'p_');
if($p_list_1!="")		{  $list_1=trim($p_list_1);				}
if($p_list_2!="")		{  $list_2=trim($p_list_2);				}
if($p_lv1!="")		{  $lv1=trim($p_lv1);				}
if($p_lv2!="")		{  $lv2=trim($p_lv2);				}
$navig['product_search']="ค้นหาผลิตภัณฑ์";
navigator($navig);
bar_header("ค้นหาผลิตภัณฑ์"); // Bar_Header

if($p_startrow!="")							{	     $startrow=trim($p_startrow);				}

echo "<form name='search_form' method='post' action='index.php?mod=product_search&path=product'>";
echo "<table align='center' width='60%'>";
	echo "<tr>";
		echo "<td>";
			echo print_arr1();
			echo "<b>โดยหมวดหลัก</b>";
		echo "</td>";
		echo "<td>";
			echo "<div id='lv1'><select>\n";   
 			 	echo "<option value=''>==============</option> \n" ;    
   			echo "</select></div>\n";     
		echo "</td>";
	echo "</tr>";
		echo "<tr>";
		echo "<td>";
		echo print_arr1();
			echo "<b>โดยหมวดรอง</b>";
		echo "</td>";
		echo "<td>";
			echo "<div id='lv2'><select>\n";   
 			 	echo "<option value=''>==============</option> \n" ;    
   			echo "</select></div>\n";     
		echo "</td>";
	echo "</tr>";
echo "</table>";

echo "<center><input type='submit' name='submit' value='ค้นหา'></center>";
echo "</form>";

if($_POST[submit])
{
	echo "<table>";
	if($lv1!="" and $lv2=="")
	{
		$res = select_result_query("*" , "cms_product", "id_product" , "$lv1" ," order by name asc , has_child DESC");
			display_result($lv1);	
	}
	else
	if($lv1!="" and $lv2!="")
	{
		display_result($lv2);	
	}
	echo "</table>";
	
}

?>


<script language="javascript" >
	function Inint_AJAX() 
	{
	  var xmlHttpRequest = false; 
                        
        // Proberen een nieuw object aan te maken. 
        try 
        { 
        
                // Nakijken of de browser Microsoft Internet Explorer is 
                if(window.ActiveXObject) 
                { 
                        
                        // Omdat elke versie van Internet Explorer een andere versie kan nodig hebben, 
                        // overlopen we elke mogelijke versie; van hoog naar laag. 
                        for(var i = 5; i; i--) 
                        { 
                                
                                try 
                                { 
                                        
                                        // De laatste versie kan niet geladen worden, dus moeten we teruggrijpen 
                                        // naar een oudere variant. 
                                        if(i == 2) 
                                        { 
                                                
                                                xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");        
                                                
                                        // De laatste mogelijke versie laden 
                                        } else { 
                                                
                                                xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP." + i + ".0"); 
                                                
                                        } 
                                        
                                        break; 
                                        
                                } 
                                
                                // Indien het object niet gemaakt kan worden, moeten we dit helaas zo teruggeven. 
                                catch(excNotLoadable) 
                                { 
                                                        
                                        xmlHttpRequest = false; 
                                        
                                } 
                                
                        } 
                        
                } 
                
                // Browsers als Opera, Mozilla (Firefox) en Safari kunnen de 'gewone' manier gebruiken 
                else if(window.XMLHttpRequest) 
                { 
                        
                        xmlHttpRequest = new XMLHttpRequest(); 
                        
                } 
                
        } 
        
        // Het is mogelijk dat de browser het object aanmaken niet ondersteunt; ook in dit geval sturen we 
        // dan ook geen object terug. 
        catch(excNotLoadable) 
        { 
                
                xmlHttpRequest = false; 
                
        } 
        
        // Het gemaakte object (of 'false' in het geval dat er een probleem was) teruggeven 
        return xmlHttpRequest; 

   }
		
	function dochange(src, val, val2) 
	{	
	//	document.getElementById("list_1").value=val;
	//	document.getElementById("list_2").value=val2;
		
		var req = Inint_AJAX();
	//	xmlHttpRequest.overrideMimeType('text/xml'); 
		//req.overrideMimeType('text/xml'); 
		req.onreadystatechange = function() 
		{
			if (req.readyState==4) 
			{ 
				if (req.status==200) 
				{
					document.getElementById(src).innerHTML=req.responseText; //retuen value
				}
			}
		};
	req.open("GET","coremain/module/product/product_ajax_content.php?data="+src+"&val="+val+"&val2="+val2); //make connection
	req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); // set Header
	req.send(null); //send value
	}
	
</script>

<?php
echo "<script language='Javascript'>";

	if($lv1!="" and $lv2=="")
		{			
			echo "window.onLoad=dochange('lv1','$lv1', '');";
			echo "window.onLoad=dochange('lv2','$lv1', '');";
		}
	else if($lv1!="" and $lv2!="" )
		{
		
			echo "window.onLoad=dochange('lv1','$lv1', '');";
			echo "window.onLoad=dochange('lv2','$lv1','$lv2');";
		}
	else
		{
			echo "window.onLoad=dochange('lv1','', '');";
		}
	echo "</script>";
?>

<?php
	function display_result($id_product){

	//echo "<br/>".$id_product."<br/>";
		//if ($show_count<=$show_limit )
		//{
			$res_show = select_result_query("*" , "cms_product", "id_product" , "$id_product" ,"order by name asc , has_child DESC");
			while ($data_show = mysql_fetch_array ($res_show))
			{
				//if($show_count<=$show_limit)
				//{
					if($data_show[id_parent]!=0)
					{
						echo "<tr>";
								echo "<td align='center' width='40%'>";
									picture_frame($_SESSION[web_name]."/module_product/picture/$data_show[picture]","index.php?mod=product_sub_detail&path=product&id_product=$data_show[id_product]");	
								echo "</td>";	
								echo "<td align='left' width='60%'>";
									echo "<table width='100%'>";
										echo "<tr>";
											echo "<td>";
											echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
												echo "<tr bgcolor='gray'>";
														echo "<td>";
														echo "หมวด";
														
														print_group($data_show[id_product]);
														echo "</td>";	
													echo "</tr>";
											echo "</table>";
											echo "</td>";
										echo "</tr>";
										echo "<tr>";
											echo "<td>";
												echo "ชื่อผลิตภัณฑ์ : ".$data_show[name];
											echo "</td>";
										echo "</tr>";
										echo "<tr>";
											echo "<td>";
												echo "รายละเอียด : ".$data_show[description];
											echo "</td>";
										echo "</tr>";
											echo "<tr>";
												echo "<td>";
													if($data_show[attach_file]!="")
														echo "ไฟล์แนบ : <a href='".$_SESSION[web_name]."/module_product/attach/$data_show[attach_file]'>$data_show[old_attach_name]</a>";
												echo "</td>";	
										echo "</tr>";
										echo "</table>";
									echo "</td>";
			echo "</tr>";
					//	$show_limit++;
						
						
					}	
					else
					{	
						$data_child = select_result_query("*","cms_product","id_parent",$data_show[id_product] ," order by name asc , has_child DESC");
							while ($data_sub = mysql_fetch_array($data_child))
							{
								display_result($data_sub[id_product]);
							}
					}
				//} else
					//return false;
				
			}
		//}
		return true;;
	}
	
	function print_group($id_product)
	{
			$result_parent = select_result_query("*" , "cms_product", "id_product" , "$id_product");
			
			while ($data_parent = mysql_fetch_array($result_parent))
			{
				if($data_parent[id_parent]!=0)
				{
					print_group($data_parent[id_parent]);
					
				}
				 if($data_parent[has_child]==1)
					{
					//	echo "<td>";
						echo print_arr1();
						echo "&nbsp;";
					//	echo "</td>";
					
					//	echo "<td>";
						echo $data_parent[name];
						echo "&nbsp;";
					//	echo "</td>";
					}
			}
			
	}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit