4 || (strlen($f_street) > 1 && (strlen($f_zipcode) > 1 || strlen($f_city) > 1))) : // ********************************************************************* // * Selection of the costcenters of the current customer for the list * // ********************************************************************* // This part only for headquarter employees if (false && $userTypeName == "hq") : $whereClause = ""; if ($f_street != "") : $whereClause .= "ad_street LIKE '" . $f_street . "%'"; endif; if ($whereClause != "" && $f_zipcode != "") : $whereClause .= " AND "; endif; if ($f_zipcode != "") : $whereClause .= "ad_zipcode LIKE '" . $f_zipcode . "%'"; endif; if ($whereClause != "" && $f_city != "") : $whereClause .= " AND "; endif; if ($f_city != "") : $whereClause .= "ad_city LIKE '" . $f_city . "%'"; endif; if ($whereClause != "" && $f_country != "") : $whereClause .= " AND "; endif; if ($f_country != "") : $whereClause .= "ad_country LIKE '" . $f_country . "%'"; endif; // if ($whereClause != "") : $whereClause = " AND " . $whereClause; endif; if ($orderClauseDefault == "") : $orderClause = "ad_street, ad_zipcode"; else : $orderClause = "ad_" . $orderClauseDefault; endif; // ***************************************************************************************************** // * TABLE "serviceplzareaaddress" Selection of the costcenter based on a search by companyname-prefix * // ***************************************************************************************************** $sqlquery = "SELECT CONCAT('BEREICH: ',srvpa.srvpa_name,' (',srvpa.srvpa_longname,')') AS ad_district," . " ad.ad_street, ad.ad_zipcode, ad.ad_city, ad.ad_country," . " CONCAT(srvpaa.srvpaa_hsno_from,'-',srvpaa.srvpaa_hsno_to) AS srvpaa_hsno," . " srvpaa_mode" . " FROM serviceplzareaaddress AS srvpaa, address AS ad, serviceplzarea AS srvpa" . " WHERE ad.ad_id = srvpaa.ad_id AND" . " srvpaa.srvpa_id = srvpa.srvpa_id" . ($whereClause != "" ? " AND " : "") . $whereClause . " ORDER BY " . $orderClause; $result = $db->query($sqlquery); if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage()); $lineToggler = 0; while ($row = $result->fetch_assoc()): $numOfRows++; if ($lineToggler == 0) : $lineToggler = 1; else : $lineToggler = 0; endif; $cellColor = getListColor($numOfRows, $lineToggler); $v_ad_district = $row["ad_district"]; $v_ad_street = $row["ad_street"]; $v_ad_zipcode = $row["ad_zipcode"]; $v_ad_city = $row["ad_city"]; $v_ad_country = $row["ad_country"]; $v_srvpaa_hsno = $row["srvpaa_hsno"]; $v_srvpaa_mode = ""; if ($row["srvpaa_mode"] == "1") : $v_srvpaa_mode = ", " . getLngt("nur ungerade"); endif; if ($row["srvpaa_mode"] == "2") : $v_srvpaa_mode = ", " . getLngt("nur gerade"); endif; $out .= ""; $out .= " " . "" . $v_ad_street . " (" . $v_srvpaa_hsno . $v_srvpaa_mode . ")" . " "; $out .= " $v_ad_zipcode   "; $out .= " $v_ad_city   "; $out .= " $v_ad_country   "; $out .= " $v_ad_district   "; $out .= "\n"; endwhile; $result->free(); // Empty line if $out is not empty if ($out != "") : $out .= " "; endif; endif; // ************************************************************************************** // * TABLE "street" Selection of the costcenter based on a search by companyname-prefix * // ************************************************************************************** $f_country = ""; // RESET because of the fact table "street" has no "DE" !!! $whereClause = ""; if ($f_street != "") : $whereClause .= "st_street LIKE '" . $f_street . "%'"; endif; if ($whereClause != "" && $f_zipcode != "") : $whereClause .= " AND "; endif; if ($f_zipcode != "") : $whereClause .= "st_zipcode LIKE '" . $f_zipcode . "%'"; endif; if ($whereClause != "" && $f_city != "") : $whereClause .= " AND "; endif; if ($f_city != "") : $whereClause .= "st_city LIKE '" . $f_city . "%'"; endif; if ($whereClause != "" && $f_country != "") : $whereClause .= " AND "; endif; if ($f_country != "") : $whereClause .= "st_country LIKE '" . $f_country . "%'"; endif; // if ($whereClause != "") : $whereClause = " AND " . $whereClause; endif; if ($orderClauseDefault == "") : $orderClause = "st_street, st_no_from, st_no_to, st_zipcode"; else : $orderClause = "st_" . $orderClauseDefault; endif; if ($orderClause == "st_street") $orderClause .= ", st_no_from, st_no_to"; $sqlquery = "SELECT st_district, st_street, st_zipcode, st_city, st_country, st_no_from, st_no_to" . " FROM phoenix_special.street" . " WHERE " . $whereClause . " ORDER BY " . $orderClause; $result = $db->query($sqlquery); if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage()); $numOfRows = 0; $lineToggler = 0; while ($row = $result->fetch_assoc()): $numOfRows++; if ($lineToggler == 0) : $lineToggler = 1; else : $lineToggler = 0; endif; $cellColor = getListColor($numOfRows, $lineToggler); $v_ad_district = $row["st_district"]; $v_ad_street = $row["st_street"]; $v_ad_no = $row["st_no_from"] . "-" . $row["st_no_to"]; $v_ad_zipcode = $row["st_zipcode"]; $v_ad_city = $row["st_city"]; $v_ad_country = $row["st_country"]; $out .= ""; // $out .= " $v_csc_name "; $out .= " " . "" . $v_ad_street . "" . " " . $v_ad_no . " "; $out .= " $v_ad_zipcode   "; $out .= " $v_ad_city   "; $out .= " $v_ad_country   "; $out .= " $v_ad_district   "; $out .= "\n"; endwhile; $result->free(); else : $statusMessage = getLngt("Eingabe entw. mind. 5 Zeichen bei Straße oder mind. 2 Zeichen bei Straße in Verbindung mit mind. 2 Zeichen bei Ort oder PLZ!"); endif; endif; function get_name() { global $db, $f_jb_id, $f_tr_sort; if ($f_jb_id == "" || $f_tr_sort == "") return; $sqlquery = "SELECT tr_comp, tr_person FROM tour WHERE jb_id = $f_jb_id AND tr_sort = $f_tr_sort"; $result = $db->query($sqlquery); if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage()); if ($row = $result->fetch_assoc()): if (trim($row["tr_person"]) != ""): return $row["tr_comp"] . ", " . $row["tr_person"]; endif; return $row["tr_comp"]; endif; } function get_google_coords() { global $f_tr_sort, $f_street, $f_zipcode, $f_city, $f_country, $f_tr_hsno; $error_codes = array( "200" => "G_GEO_SUCCESS", //Keine Fehler aufgetreten; die Adresse wurde erfolgreich analysiert. Der Geocode wurde zurückgegeben. "500" => "G_GEO_SERVER_ERROR", //Eine Geocodierungs- oder Routenanforderung konnte nicht erfolgreich verarbeitet werden, da der genaue Grund für den Fehler nicht bekannt ist. "601" => "G_GEO_MISSING_QUERY", //Für den HTTP Parameter q wurde eine leere Adresse angegeben. "602" => "G_GEO_UNKNOWN_ADDRESS", //Zu der angegebenen Adresse wurde keine geografische Entsprechung gefunden. Möglicherweise ist die Adresse relativ neu oder nicht richtig. "603" => "G_GEO_UNAVAILABLE_ADDRESS", //Der Geocode für die angegebene Adresse oder die Route für die angegebene Richtungsanfrage kann aus rechtlichen oder Vertragsgründen nicht zurückgegeben werden. "610" => "G_GEO_BAD_KEY", //Der angegebene Schlüssel ist entweder ungültig oder passt nicht zur Domain, für die er angegeben wurde. "620" => "G_GEO_TOO_MANY_QUERIES" //Der angegebene Schlüssel hat innerhalb des Zeitraums von 24 Stunden das Limit für Anforderungen überschritten oder zu viele Anforderungen in einem zu kurzen Zeitraum übermittelt. Wenn Sie zahlreiche Anforderungen gleichzeitig oder kurz hintereinander übermitteln, verwenden Sie in Ihrem Code einen Timer oder eine Pause, damit die Anforderungen nicht zu schnell übermittelt werden. ); $accuracy = array( '0' => 'Genauigkeit unbekannt', '1' => 'Land', '2' => 'Region (Bundesland/Bundesstaat, Provinz, Präfektur usw. )', '3' => 'Kreis (Bezirk, Gemeinde usw. )', '4' => 'Ortschaft (Stadt, Dorf)', '5' => 'Postleitzahl (PLZ)', '6' => 'Straße', '7' => 'Kreuzung', '8' => 'Adresse', '9' => 'Grundstück (Name des Gebäude/Grundstücks, Einkaufszentrum usw.)' ); //echo "http://maps.google.com/maps/geo?q=" . rawurlencode($f_street . " " . $f_tr_hsno) . "," . rawurlencode($f_zipcode . " " . $f_city) . "&output=csv"; $lines = file ("http://maps.google.com/maps/geo?q=" . rawurlencode($f_street . " " . $f_tr_hsno) . "," . rawurlencode($f_zipcode . " " . $f_city) . "&output=csv"); $result = explode(",", $lines[0]); if ($result[0] == "200"): return $result[2] . ", " . $result[3] . " (Genauigkeit: " . $accuracy[$result[1]] . ")"; else: return $error_codes[$result[0]]; endif; } ?> <?php echo $pageTitel ?>
        
Name:
//
" size="30" onclick="finishPageCheckAddress('checkCorrectAdress')"> " size="30" onclick="finishPage()"> " size="30" disabled>