include("../inc_admin/open.php");
if (!$s_lang) { $ext="uk"; } else { $ext=""; }
$recherche="";
if ($destination != "") {  // on a saisit qqchose à rechercher
  $recherche="oui";
?>
	
	   
		|   | 
		
		   | 
		  | 
		
		 
		     
			  
		
			
			   if ($niveau!="pays"){ ?>		
				  
			  |   | 
				  } else { ?>
				  
			    | 
				  } ?>
			 
			
				  | 
				  | 
				  | 
			 
			
				  | 
				
					
						  
			                
                 
                   if(!$s_lang){?>
                  Résultat de la recherche 
                   } else { ?>
                  Result of research 
                   } ?>
                   
                   
        			         | 
						   
						   if ($niveau!="pays"){ ?>
						 
								
								   
                | 
                   if(!$s_lang){?>
                  Zone 
                   } else { ?>
                  Area 
                   } ?>
                   | 
									
                
                   if(!$s_lang){?>
                  Pays 
                   } else { ?>
                  Country 
                   } ?>
                    
                   if(!$s_lang){?>
                  (cliquez sur le nom pour sélectionner le pays) 
                   } else { ?>
                  (click on the name to select the country ) 
                   } ?>
                   | 
							   
						  
							  // on fait une boucle pour rechecher sur le début du mot si non trouvé en entier
							  while (strlen($destination)>0)
							  { 
								$req = "select distinct pa_nom, zo_nom, pays.id_zone, pays.id_pays from pays,zone where pays.id_zone = zone.id_zone and pa_nom like '$destination%'";
							    $res=Sql_Verif_Exec($req,"S","mysql_query");
								 while ($row=mysql_fetch_array($res) )
								 { 
								  if ($row[pa_nom]!="FRANCE") {?>
									  
										|   
											   echo $row[zo_nom] ;?>
										    | 
										  
											
												 echo $row[pa_nom] ;?> 
											 } else { ?>
											  echo $row[pa_nom] ;?>
											 } ?>
										    | 
									   
								   } //fin if FRANCE
								  } // fin while
								  if (mysql_num_rows($res) > 0 ) {$destination="";}
								  $i=strlen($destination)-1;
								  if ($i>0) { $destination = substr($destination,0,$i); }
								}
							} // fin recherche région
							else
							{  // recherche du pays d'une destination
							 ?>
								 
									
                | 
                   if(!$s_lang){?>
                  Zone 
                   } else { ?>
                  Area 
                   } ?>
                   | 
									
                
                   if(!$s_lang){?>
                  Pays 
                   } else { ?>
                  Country 
                   } ?>
                   | 
					                
                Destination 
                   
                   if(!$s_lang){?>
                  (cliquez sur le nom pour sélectionner la destination) 
                   } else { ?>
                  (click on the name to select the destination ) 
                   } ?>
                   | 
									Type | 
							   
							  
							  // on fait une boucle pour rechecher sur le début du mot si non trouvé en entier
							  while (strlen($destination)>0)
							  {
								$req = "select distinct zo_nom, pa_nom, po_nom, po_type, port.id_port, pays.id_pays from zone,port,pays where zone.id_zone = pays.id_zone and pays.id_pays = port.id_pays and po_nom like '$destination%'order by po_nom";
							    $res=Sql_Verif_Exec($req,"S","mysql_query");
								if (mysql_num_rows($res) > 0 )
								{
									while ($row=mysql_fetch_array($res) )
									{ 
									  if ($row[pa_nom]!="FRANCE") {?>
										   
											|   
											   echo $row[zo_nom] ;?>
											    | 
											  
											   echo $row[pa_nom] ;?>
											    | 
											  
												 if ($page=='fret') { ?>
													  echo $row[po_nom] ;?>
												 } else {
													if ($row[po_type]!="port")
													{
														
													?>
														  echo $row[po_nom] ;?>
													  } else { ?>
													   echo $row[po_nom] ;?>
													  } 
												 }?>
											    | 
											  
											   echo $row[po_type] ;?>
											    | 
										   
										   
										  $destination="";
										  } // fin if FRANCE
									  } // fin while
								  } // fin if
								  $i=strlen($destination)-1;
								  if ($i>0) {$destination = substr($destination,0,$i);
								 }
							} // fin while $destination
						} // fin recherche pays
						?>
						 
					 | 
					  | 
				 
					  | 
					  | 
					  | 
				 
			 
		 | 
		  | 
		
		  | 
		  | 
	 
 
		
		} // fin recherche
?>
	
		  
 
include("../inc_admin/close.php"); 
 ?>
	
 			   | 
 		
		
		 |