"; // Ouvre div a la place de top_menu car le llxFooter en ferme un
-
-print "
\n";
-
-$db->close();
-
-llxFooter('$Date$ - $Revision$',0);
-
-
-/**
- * Return cursor on request to find zip/town
- *
- * @param $table
- * @return cursor
- */
-function run_request($table)
-{
- global $db;
- $cp=isset($_GET["cp"])?trim($_GET["cp"]):'';
-
- $sql = "SELECT DISTINCT cp, ville, fk_departement, fk_pays, p.code as pays_code, p.libelle as pays_lib";
- $sql.= " FROM ".MAIN_DB_PREFIX.$table;
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid';
- $sql.= " WHERE";
- if ($cp)
- {
- $cp=str_replace('*','%',$cp);
- $sql.= " cp LIKE '".addslashes($cp)."' AND";
- $sql.= " (ville IS NOT NULL OR fk_departement IS NOT NULL OR fk_pays IS NOT NULL)";
- }
- else $sql.= " cp != '' AND cp IS NOT NULL";
- $sql.= " ORDER by fk_pays, ville, cp";
- $sql.= $db->plimit(50); // Avoid pb with bad criteria
-
- //print $sql.'
';
- $result=$db->query($sql);
- if (!$result)
- {
- dol_print_error($db);
- exit;
- }
-
- return $result;
-}
-
-?>
diff --git a/htdocs/lib/lib_head.js b/htdocs/lib/lib_head.js
index 972074c75b1..bcb05299d6f 100644
--- a/htdocs/lib/lib_head.js
+++ b/htdocs/lib/lib_head.js
@@ -11,24 +11,6 @@
//
-/*=================================================================
- Purpose: Pour la fonction de saisie auto des villes
- Input: postalcode,objecttown,objectcountry,objectstate
- Author: Eric Seigne
- Licence: GPL
-==================================================================*/
-function autofilltownfromzip_PopupPostalCode(url_root, postalcode,objecttown,objectcountry,objectstate)
-{
- var url = url_root + '/core/searchpostalcode.php?cp=' + postalcode;
- url = url + '&targettown=window.opener.document.formsoc.' + objecttown.name;
- url = url + '&targetcountry=window.opener.document.formsoc.' + objectcountry.name;
- url = url + '&targetstate=window.opener.document.formsoc.' + objectstate.name;
- // alert(url);
- var hWnd = window.open(url, "SearchPostalCodeWindow", "width=" + 300 + ",height=" + 150 + ",resizable=yes,scrollbars=yes");
- if((document.window != null) && (!hWnd.opener)) hWnd.opener = document.window;
-}
-
-
/*
* =================================================================
* Purpose: