"; echo "var conffile = '".$_REQUEST["conf_file"]."';"; echo "var lingo = '".$_REQUEST["lingo"]."';"; echo "var backlink = '".$_REQUEST["backlink"]."';"; $lingo = $_REQUEST["lingo"]; $title = "layername_".$lingo; require_once(dirname(__FILE__) . "/../../conf/".$_REQUEST["conf_file"]); echo ""; ?> "; echo "Suchen:    "; echo ""; echo ""; echo ""; } else{ if(preg_match("/\*/",$_REQUEST["search"])){ $search = trim(preg_replace("/\*/i","", $_REQUEST["search"])); } $con = pg_connect ($con_string) or die ("Error while connecting database $dbname"); #$sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,search_columns, search_result FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'"; $sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,".$title.",search_columns, search_result,search_keywords, wms_title FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'"; $res = pg_query($con,$sql); $cnt = 0; while(pg_fetch_row($res)){ $table[$cnt] = pg_result($res,$cnt,"identificationinfo"); # Tabellen, Abfragenname $minscale[$cnt] = pg_result($res,$cnt,"minscale"); $md_fileidentifier[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername $layername[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername in der Mapdatei $result_title[$cnt] = pg_result($res,$cnt,"\"".$title."\""); # layer_deutsch Ergebnisname $search_columns[$cnt] = pg_result($res,$cnt,"search_columns"); # Suchspalten, Trennung �ber , $search_result[$cnt] = pg_result($res,$cnt,"search_result"); # Ergebnisspalte $search_keywords[$cnt] = pg_result($res,$cnt,"search_keywords"); # Ergebnisspalte $wms_title[$cnt] = pg_result($res,$cnt,"wms_title"); # WMS tile # if one of the searchkeywords is found the data of the whole table is displayed as the result if($search_keywords[$cnt] != '') { $array_search_keywords = explode(",", $search_keywords[$cnt]); $all[$cnt] = false; for ($p=0 ; $p0){ $all[$cnt] = true; } } } //echo "hit:".$hit."all: ".$all[$cnt] ; $cnt++; } $field_has_parent = false; $has_result = false; for($i=0; $i0){ $array_search_columns[count($array_search_columns)] = $array_search_columns [0]; $array_search_columns [0] = "platzhalterxy"; for($j=0; $j0){ $sel_lay = pg_result($res1,$cnt,"fkey_md_fileidentifier"); if($minscale[$i] > 0){$scale = $minscale[$i]+100; } for ($cnt=0; $cnt < pg_num_rows($res1); $cnt++){ if($cnt == 0){ $title = "layername_".$lingo; echo "
".$result_title[$i]. "
"; } if($_REQUEST["backlink"]=='parent'){ echo ""; echo pg_result($res1,$cnt,$search_result[$i])."
"; $has_result = true; } } } if($has_result == false){echo "Kein Ergebnis!";} echo "
"; echo "
"; } ?>