From: Pascal Corpet Date: Sat, 11 Jun 2005 00:30:00 +0000 (+0000) Subject: changement ville -> city, cp ->postcode et pays -> country X-Git-Tag: xorg/old~69 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8dd71c4e8a4a756dfdb4b472dfe3cf0ceb686061;p=platal.git changement ville -> city, cp ->postcode et pays -> country git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-695 --- diff --git a/htdocs/advanced_search.php b/htdocs/advanced_search.php index 9f3e91e..9832e54 100644 --- a/htdocs/advanced_search.php +++ b/htdocs/advanced_search.php @@ -82,8 +82,8 @@ if (!Env::has('rechercher')) { $subscriberField = new RefSField('subscriber',array('!(u.perms IN (\'admin\',\'user\'))+1'),'','',''); $aliveField = new RefSField('alive',array('(u.deces!=0)+1'),'','',''); - $townField = new RefSField('ville',array('av.ville'),'adresses','av','u.user_id=av.uid',false); - $countryField = new RefSField('pays',array('ap.pays'),'adresses','ap','u.user_id=ap.uid'); + $townField = new RefSField('city',array('av.city'),'adresses','av','u.user_id=av.uid',false); + $countryField = new RefSField('country',array('ap.country'),'adresses','ap','u.user_id=ap.uid'); $regionField = new RefSField('region',array('ar.region'),'adresses','ar','u.user_id=ar.uid'); $entrepriseField = new RefSField('entreprise',array('ee.entreprise'),'entreprises','ee','u.user_id=ee.uid',false); diff --git a/htdocs/carnet/mescontacts.php b/htdocs/carnet/mescontacts.php index 2ad376e..ccea643 100644 --- a/htdocs/carnet/mescontacts.php +++ b/htdocs/carnet/mescontacts.php @@ -126,7 +126,7 @@ if(Get::get('trombi')) { IF(n.nat='',n.pays,n.nat) AS nat, n.a2 AS iso3166, ad0.text AS app0text, ad0.url AS app0url, ai0.type AS app0type, ad1.text AS app1text, ad1.url AS app1url, ai1.type AS app1type, - adr.ville, gp.a2, gp.pays, gr.name AS region, + adr.city, gp.a2, gp.pays, gr.name AS region, IF(a.nom_usage<>'',a.nom_usage,a.nom) AS sortkey FROM contacts AS c INNER JOIN auth_user_md5 AS a ON (a.user_id = c.contact) @@ -140,8 +140,8 @@ if(Get::get('trombi')) { LEFT JOIN applis_ins AS ai1 ON (a.user_id = ai1.uid AND ai1.ordre = 1) LEFT JOIN applis_def AS ad1 ON (ad1.id = ai1.aid) LEFT JOIN adresses AS adr ON (a.user_id = adr.uid AND FIND_IN_SET('active', adr.statut)) - LEFT JOIN geoloc_pays AS gp ON (adr.pays = gp.a2) - LEFT JOIN geoloc_region AS gr ON (adr.pays = gr.a2 AND adr.region = gr.region) + LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2) + LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region) WHERE c.uid = $uid ORDER BY ".$order; diff --git a/htdocs/fiche.php b/htdocs/fiche.php index 1842dc1..6e685e9 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -89,10 +89,10 @@ if (!logged()) { $user['adr'][$i]['adr1'] = ''; $user['adr'][$i]['adr2'] = ''; $user['adr'][$i]['adr3'] = ''; - $user['adr'][$i]['ville'] = ''; - $user['adr'][$i]['cp'] = ''; + $user['adr'][$i]['city'] = ''; + $user['adr'][$i]['postcode'] = ''; $user['adr'][$i]['region'] = ''; - $user['adr'][$i]['pays'] = ''; + $user['adr'][$i]['country'] = ''; } elseif ($adr['tel_pub'] != 'public') { $user['adr'][$i]['tel'] = ''; @@ -107,10 +107,10 @@ if (!logged()) { $user['adr_pro'][$i]['adr1'] = ''; $user['adr_pro'][$i]['adr2'] = ''; $user['adr_pro'][$i]['adr3'] = ''; - $user['adr_pro'][$i]['ville'] = ''; - $user['adr_pro'][$i]['cp'] = ''; + $user['adr_pro'][$i]['city'] = ''; + $user['adr_pro'][$i]['postcode'] = ''; $user['adr_pro'][$i]['region'] = ''; - $user['adr_pro'][$i]['pays'] = ''; + $user['adr_pro'][$i]['country'] = ''; } if ($adr['pub'] != 'public') { $user['adr_pro'][$i]['entreprise'] = ''; @@ -139,7 +139,7 @@ foreach($user['adr_pro'] as $i=>$pro) { if ($pro['entreprise'] == '' && $pro['fonction'] == '' && $pro['secteur'] == '' && $pro['poste'] == '' && $pro['adr1'] == '' && $pro['adr2'] == '' && $pro['adr3'] == '' - && $pro['cp'] == '' && $pro['ville'] == '' && $pro['pays'] == '' + && $pro['postcode'] == '' && $pro['city'] == '' && $pro['country'] == '' && $pro['tel'] == '' && $pro['fax'] == '' && $pro['mobile'] == '' && $pro['email'] == '') unset($user['adr_pro'][$i]); diff --git a/htdocs/fiche_referent.php b/htdocs/fiche_referent.php index b7107a6..2eec23d 100644 --- a/htdocs/fiche_referent.php +++ b/htdocs/fiche_referent.php @@ -49,14 +49,14 @@ $page->assign('bestalias', $bestalias); //recuperation des infos professionnelles $res = $globals->xdb->query( "SELECT e.entreprise, s.label as secteur , ss.label as ss_secteur , f.fonction_fr as fonction, - e.poste, e.adr1, e.adr2, e.adr3, e.cp, e.ville, + e.poste, e.adr1, e.adr2, e.adr3, e.postcode, e.city, gp.pays, gr.name, e.tel, e.fax, e.mobile FROM entreprises AS e LEFT JOIN emploi_secteur AS s ON(e.secteur = s.id) LEFT JOIN emploi_ss_secteur AS ss ON(e.ss_secteur = ss.id AND e.secteur = ss.secteur) LEFT JOIN fonctions_def AS f ON(e.fonction = f.id) - LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.pays) - LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.pays and gr.region = e.region) + LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.country) + LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.country and gr.region = e.region) WHERE e.uid = {?} ORDER BY e.entrid", $user_id); $page->assign('adr_pro', $res->fetchAllAssoc()); diff --git a/htdocs/vcard.php b/htdocs/vcard.php index 79a115e..43e8583 100644 --- a/htdocs/vcard.php +++ b/htdocs/vcard.php @@ -26,12 +26,12 @@ require_once("user.func.inc.php"); function format_adr($params, &$smarty) { - // $adr1, $adr2, $adr3, $cp, $ville, $region, $pays + // $adr1, $adr2, $adr3, $postcode, $city, $region, $country extract($params['adr']); $adr = $adr1; $adr = trim("$adr\n$adr2"); $adr = trim("$adr\n$adr3"); - return quoted_printable_encode(";;$adr;$ville;$region;$cp;$pays"); + return quoted_printable_encode(";;$adr;$city;$region;$postcode;$country"); } $page->register_modifier('qp_enc', 'quoted_printable_encode'); diff --git a/include/contacts.pdf.inc.php b/include/contacts.pdf.inc.php index e1b67c2..e47628e 100644 --- a/include/contacts.pdf.inc.php +++ b/include/contacts.pdf.inc.php @@ -175,7 +175,7 @@ class ContactsPDF extends FPDF $r = trim("$r\n".$a['adr1']); $r = trim("$r\n".$a['adr2']); $r = trim("$r\n".$a['adr3']); - $r = trim("$r\n".trim($a['cp'].' '.$a['ville'])); + $r = trim("$r\n".trim($a['postcode'].' '.$a['city'])); $this->TableRow($l, $r); @@ -193,12 +193,12 @@ class ContactsPDF extends FPDF $this->TableRow('Entreprise', $a['entreprise']); } - if ($a['adr1'] || $a['adr2'] || $a['adr3'] || $a['cp'] || $a['ville']) { + if ($a['adr1'] || $a['adr2'] || $a['adr3'] || $a['postcode'] || $a['city']) { $r = ''; $r = trim("$r\n".$a['adr1']); $r = trim("$r\n".$a['adr2']); $r = trim("$r\n".$a['adr3']); - $r = trim("$r\n".trim($a['cp'].' '.$a['ville'])); + $r = trim("$r\n".trim($a['postcode'].' '.$a['city'])); $this->TableRow('adresse pro', $r); } @@ -310,7 +310,7 @@ class ContactsPDF extends FPDF foreach ($x['adr_pro'] as $a) { if ( ! ($a['entreprise'] || $a['tel'] || $a['fax'] - || $a['adr1'] || $a['adr2'] || $a['adr3'] || $a['cp'] || $a['ville']) ) + || $a['adr1'] || $a['adr2'] || $a['adr3'] || $a['postcode'] || $a['city']) ) { continue; } diff --git a/include/money/paypal.inc.php b/include/money/paypal.inc.php index 4290051..63634c5 100644 --- a/include/money/paypal.inc.php +++ b/include/money/paypal.inc.php @@ -74,7 +74,7 @@ class PayPal $res = $globals->xdb->query( "SELECT a.adr1 AS address1, a.adr2 AS address2, - a.ville AS city, a.cp AS zip, a.pays AS country, + a.city, a.postcode AS zip, a.country, IF(a.tel, a.tel, q.profile_mobile) AS night_phone_b FROM auth_user_quick AS q LEFT JOIN adresses AS a ON (q.user_id = a.uid) diff --git a/include/profil/assign_emploi.inc.php b/include/profil/assign_emploi.inc.php index ac18632..bfb867e 100644 --- a/include/profil/assign_emploi.inc.php +++ b/include/profil/assign_emploi.inc.php @@ -28,9 +28,9 @@ $page->assign('fonction',$fonction); $page->assign('adrpro1',$adrpro1); $page->assign('adrpro2',$adrpro2); $page->assign('adrpro3',$adrpro3); -$page->assign('cppro',$cppro); -$page->assign('villepro',$villepro); -$page->assign('payspro',$payspro); +$page->assign('postcodepro',$postcodepro); +$page->assign('citypro',$citypro); +$page->assign('countrypro',$countrypro); $page->assign('regionpro',$regionpro); $page->assign('telpro',$telpro); $page->assign('faxpro',$faxpro); diff --git a/include/profil/get_adresses.inc.php b/include/profil/get_adresses.inc.php index e5bb326..0e903e1 100644 --- a/include/profil/get_adresses.inc.php +++ b/include/profil/get_adresses.inc.php @@ -30,7 +30,7 @@ function is_adr_empty($adrid){ $adr = &$GLOBALS['adresses'][$adrid]; return ( ($adr['adr1'] == '') && ($adr['adr2'] == '') && ($adr['adr3'] == '') && - ($adr['cp'] == '') && ($adr['ville'] == '') && ($adr['pays'] == '00') && + ($adr['postcode'] == '') && ($adr['city'] == '') && ($adr['country'] == '00') && ($adr['tel'] == '') && ($adr['fax'] == '') ); } @@ -66,8 +66,8 @@ $res = $globals->xdb->iterRow( "SELECT FIND_IN_SET('res-secondaire', statut), FIND_IN_SET('courrier', statut), FIND_IN_SET('active', statut), FIND_IN_SET('temporaire', statut), - adr1, adr2, adr3, cp, ville, - pays, region, tel, fax, pub, tel_pub + adr1, adr2, adr3, postcode, city, + country, region, tel, fax, pub, tel_pub FROM adresses WHERE uid = {?} AND NOT FIND_IN_SET('pro',statut) ".$sql_order , Session::getInt('uid', -1) @@ -81,8 +81,8 @@ for ($i = 0; $i < $nb_adr; $i++) { list( $adresses[$adrid]['secondaire'], $adresses[$adrid]['courrier'], $adresses[$adrid]['active'], $adresses[$adrid]['temporaire'], - $adresses[$adrid]['adr1'], $adresses[$adrid]['adr2'], $adresses[$adrid]['adr3'], $adresses[$adrid]['cp'], $adresses[$adrid]['ville'], - $adresses[$adrid]['pays'], $adresses[$adrid]['region'], $adresses[$adrid]['tel'], $adresses[$adrid]['fax'], + $adresses[$adrid]['adr1'], $adresses[$adrid]['adr2'], $adresses[$adrid]['adr3'], $adresses[$adrid]['postcode'], $adresses[$adrid]['city'], + $adresses[$adrid]['country'], $adresses[$adrid]['region'], $adresses[$adrid]['tel'], $adresses[$adrid]['fax'], $adresses[$adrid]['pub'], $adresses[$adrid]['tel_pub'],) = $res->next(); $adresses[$adrid]['nouvelle'] = 'modif'; diff --git a/include/profil/get_emploi.inc.php b/include/profil/get_emploi.inc.php index 4b8af53..46d32fd 100644 --- a/include/profil/get_emploi.inc.php +++ b/include/profil/get_emploi.inc.php @@ -24,7 +24,7 @@ require_once('secteur.emploi.inc.php'); require_once('fonction.emploi.inc.php'); $res = $globals->xdb->iterRow("SELECT entrid, entreprise, secteur, ss_secteur, poste, fonction, - adr1, adr2, adr3, cp, ville, pays, region, tel, fax, mobile, + adr1, adr2, adr3, postcode, city, country, region, tel, fax, mobile, pub, adr_pub, tel_pub, email, email_pub, web FROM entreprises WHERE uid = {?} ORDER BY entrid",Session::getInt('uid', -1)); @@ -32,7 +32,7 @@ $res = $globals->xdb->iterRow("SELECT entrid, entreprise, secteur, ss_secteur, p $nb_res = $res->total(); for($i = 0; $i < $nb_res ; $i++){ list($endrid[$i], $entreprise[$i], $secteur[$i], $ss_secteur[$i], $poste[$i], $fonction[$i], - $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $cppro[$i], $villepro[$i], $payspro[$i], $regionpro[$i], + $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $postcodeppro[$i], $citypro[$i], $countrypro[$i], $regionpro[$i], $telpro[$i], $faxpro[$i], $mobilepro[$i], $pubpro[$i], $adr_pubpro[$i], $tel_pubpro[$i], $emailpro[$i], $email_pubpro[$i], $webpro[$i]) = $res->next(); } @@ -47,9 +47,9 @@ for($i = $nb_res; $i < 2 ; $i++){ $adrpro1[$i] = ''; $adrpro2[$i] = ''; $adrpro3[$i] = ''; - $cppro[$i] = ''; - $villepro[$i] = ''; - $payspro[$i] = '00'; + $postcodepro[$i] = ''; + $citypro[$i] = ''; + $countrypro[$i] = '00'; $regionpro[$i] = ''; $telpro[$i] = ''; $faxpro[$i] = ''; diff --git a/include/profil/update_adresses.inc.php b/include/profil/update_adresses.inc.php index 45b9b41..9ca73b5 100644 --- a/include/profil/update_adresses.inc.php +++ b/include/profil/update_adresses.inc.php @@ -41,9 +41,9 @@ foreach($adresses as $adrid => $adr){ adr1 = {?}, adr2 = {?}, adr3 = {?}, - cp = {?}, - ville = {?}, - pays = {?}, + postcode = {?}, + city = {?}, + country = {?}, region = {?}, tel = {?}, fax = {?}, @@ -55,9 +55,9 @@ foreach($adresses as $adrid => $adr){ $adr['adr1'], $adr['adr2'], $adr['adr3'], - $adr['cp'], - $adr['ville'], - $adr['pays'], + $adr['postcode'], + $adr['city'], + $adr['country'], $adr['region'], $adr['tel'], $adr['fax'], @@ -74,9 +74,9 @@ foreach($adresses as $adrid => $adr){ adr1 = {?}, adr2 = {?}, adr3 = {?}, - cp = {?}, - ville = {?}, - pays = {?}, + postcode = {?}, + city = {?}, + country = {?}, region = {?}, tel = {?}, fax = {?}, @@ -88,9 +88,9 @@ foreach($adresses as $adrid => $adr){ $adr['adr1'], $adr['adr2'], $adr['adr3'], - $adr['cp'], - $adr['ville'], - $adr['pays'], + $adr['postcode'], + $adr['city'], + $adr['country'], $adr['region'], $adr['tel'], $adr['fax'], diff --git a/include/profil/update_emploi.inc.php b/include/profil/update_emploi.inc.php index 405f89c..d5827b9 100644 --- a/include/profil/update_emploi.inc.php +++ b/include/profil/update_emploi.inc.php @@ -21,7 +21,7 @@ for($i = 0; $i < 2; $i++){ - $globals->xdb->execute("REPLACE INTO entreprises(uid,entrid,entreprise,secteur,ss_secteur,poste,fonction,adr1,adr2,adr3,cp,ville,pays,region,tel,fax,mobile,pub, adr_pub, tel_pub, email, email_pub, web) ". + $globals->xdb->execute("REPLACE INTO entreprises(uid,entrid,entreprise,secteur,ss_secteur,poste,fonction,adr1,adr2,adr3,postcode,city,country,region,tel,fax,mobile,pub, adr_pub, tel_pub, email, email_pub, web) ". "VALUES ({?}, {?}, {?}, ". "{?},". "{?}". @@ -35,8 +35,8 @@ for($i = 0; $i < 2; $i++){ ( ($secteur[$i] == "") ? null : $secteur[$i]), //sinon un faux 0 est rentre dans la base ( ($ss_secteur[$i] == "") ? null : $ss_secteur[$i]), $poste[$i], $fonction[$i], - $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $cppro[$i], - $villepro[$i], $payspro[$i], + $adrpro1[$i], $adrpro2[$i], $adrpro3[$i], $postcodepro[$i], + $citypro[$i], $countrypro[$i], $regionpro[$i], $telpro[$i], $faxpro[$i], $mobilepro[$i], $pubpro[$i], $adr_pubpro[$i], $tel_pubpro[$i], $emailpro[$i], $email_pubpro[$i], $webpro[$i]); diff --git a/include/profil/verif_adresses.inc.php b/include/profil/verif_adresses.inc.php index 0801a7a..17b2f7a 100644 --- a/include/profil/verif_adresses.inc.php +++ b/include/profil/verif_adresses.inc.php @@ -75,9 +75,9 @@ function replace_address($i){ replace_ifset_adr('adr1', $i); replace_ifset_adr('adr2', $i); replace_ifset_adr('adr3', $i); - replace_ifset_adr('cp', $i); - replace_ifset_adr('ville', $i); - replace_ifset_adr('pays', $i); + replace_ifset_adr('postcode', $i); + replace_ifset_adr('city', $i); + replace_ifset_adr('country', $i); replace_ifset_adr('region', $i); replace_ifset_adr('tel', $i); replace_ifset_adr('fax', $i); @@ -117,11 +117,11 @@ foreach($adresses as $adrid => $adr) { { $str_error = $str_error."Le champ '$description - Ligne 3' contient un caractère interdit.
"; } - if (strlen(strtok($adr['cp'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['cp'])) + if (strlen(strtok($adr['postcode'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['postcode'])) { $str_error = $str_error."Le champ '$description - Code Postal' contient un caractère interdit.
"; } - if (strlen(strtok($adr['ville'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['ville'])) + if (strlen(strtok($adr['city'],"<>{}@~?!§*`|%$^=+")) < strlen($adr['postcode'])) { $str_error = $str_error."Le champ '$description - Ville' contient un caractère interdit.
"; } @@ -161,9 +161,9 @@ if (!isset($adresses) || (count($adresses) < $nb_adr_max)){ $adr['adr1'] = ''; $adr['adr2'] = ''; $adr['adr3'] = ''; - $adr['cp'] = ''; - $adr['ville'] = ''; - $adr['pays'] = '00'; + $adr['postcode'] = ''; + $adr['city'] = ''; + $adr['country'] = '00'; $adr['region'] = ''; $adr['tel'] = ''; $adr['fax'] = ''; diff --git a/include/profil/verif_emploi.inc.php b/include/profil/verif_emploi.inc.php index 9312fdf..02f7d77 100644 --- a/include/profil/verif_emploi.inc.php +++ b/include/profil/verif_emploi.inc.php @@ -40,9 +40,9 @@ replace_ifset_i($fonction,"fonction",$i); replace_ifset_i($adrpro1,"adrpro1",$i); replace_ifset_i($adrpro2,"adrpro2",$i); replace_ifset_i($adrpro3,"adrpro3",$i); -replace_ifset_i($cppro,"cppro",$i); -replace_ifset_i($villepro,"villepro",$i); -replace_ifset_i($payspro,"payspro",$i); +replace_ifset_i($postcodepro,"postcodepro",$i); +replace_ifset_i($citypro,"citypro",$i); +replace_ifset_i($countrypro,"countrypro",$i); replace_ifset_i($regionpro,"regionpro",$i); replace_ifset_i($telpro,"telpro",$i); replace_ifset_i($faxpro,"faxpro",$i); @@ -105,11 +105,11 @@ if (strlen(strtok($adrpro1[$i],"<>{}@~?! { $str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 3' contient un caractère interdit.
"; } - if (strlen(strtok($cppro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($cppro[$i])) + if (strlen(strtok($postcodepro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($postcodepro[$i])) { $str_error = $str_error."Le champ 'Code Postal professionnel $j' contient un caractère interdit.
"; } - if (strlen(strtok($villepro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($villepro[$i])) + if (strlen(strtok($citypro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($citypro[$i])) { $str_error = $str_error."Le champ 'Ville professionnelle $j' contient un caractère interdit.
"; } diff --git a/include/search/classes.inc.php b/include/search/classes.inc.php index 80325fd..94ef6d7 100644 --- a/include/search/classes.inc.php +++ b/include/search/classes.inc.php @@ -42,14 +42,14 @@ if (logged()) q.profile_web AS web, q.profile_mobile AS mobile, q.profile_freetext AS freetext, - adr.ville, gp.pays, gr.name AS region, + adr.city, gp.pays, gr.name AS region, e.entreprise,'; else $globals->search->result_fields .=" IF(q.profile_web_pub='public', q.profile_web, '') AS web, IF(q.profile_mobile_pub='public', q.profile_mobile, '') AS mobile, IF(q.profile_freetext_pub='public', q.profile_freetext, '') AS freetext, - IF(adr.pub='public', adr.ville, '') AS ville, + IF(adr.pub='public', adr.city, '') AS city, IF(adr.pub='public', gp.pays, '') AS pays, IF(adr.pub='public', gr.name, '') AS region, IF(e.pub='public', e.entreprise, '') AS entreprise,"; @@ -63,8 +63,8 @@ $globals->search->result_where_statement = ' LEFT JOIN fonctions_def AS ef ON (e.fonction = ef.id) LEFT JOIN geoloc_pays AS n ON (u.nationalite = n.a2) LEFT JOIN adresses AS adr ON (u.user_id = adr.uid AND FIND_IN_SET(\'active\',adr.statut)) - LEFT JOIN geoloc_pays AS gp ON (adr.pays = gp.a2) - LEFT JOIN geoloc_region AS gr ON (adr.pays = gr.a2 AND adr.region = gr.region)'; + LEFT JOIN geoloc_pays AS gp ON (adr.country = gp.a2) + LEFT JOIN geoloc_region AS gr ON (adr.country = gr.a2 AND adr.region = gr.region)'; // }}} // {{{ function display_lines() diff --git a/include/synchro_ax.inc.php b/include/synchro_ax.inc.php index 4317f1f..8345172 100644 --- a/include/synchro_ax.inc.php +++ b/include/synchro_ax.inc.php @@ -66,10 +66,10 @@ function get_user_ax($uid, $raw=false) $jobax['adr1'] = $ancien->Adresse_act_adresse1($i); $jobax['adr2'] = $ancien->Adresse_act_adresse2($i); $jobax['adr3'] = $ancien->Adresse_act_adresse3($i); - $jobax['cp'] = $ancien->Adresse_act_code_pst($i); - $jobax['ville'] = $ancien->Adresse_act_ville($i); + $jobax['postcode'] = $ancien->Adresse_act_code_pst($i); + $jobax['city'] = $ancien->Adresse_act_ville($i); $jobax['region'] = $ancien->Adresse_act_etat_region($i); - $jobax['pays'] = $ancien->Adresse_act_pays($i); + $jobax['country'] = $ancien->Adresse_act_pays($i); $jobax['tel'] = $ancien->Adresse_act_tel($i); $jobax['fax'] = $ancien->Adresse_act_fax($i); $jobax['mobile'] = $ancien->Adresse_act_mobile($i); @@ -82,10 +82,10 @@ function get_user_ax($uid, $raw=false) $adrax['adr1'] = $ancien->Adresse1($i); $adrax['adr2'] = $ancien->Adresse2($i); $adrax['adr3'] = $ancien->Adresse3($i); - $adrax['cp'] = $ancien->Code_pst($i); - $adrax['ville'] = $ancien->Ville($i); + $adrax['postcode'] = $ancien->Code_pst($i); + $adrax['city'] = $ancien->Ville($i); $adrax['region'] = $ancien->Etat_region($i); - $adrax['pays'] = $ancien->Pays($i); + $adrax['country'] = $ancien->Pays($i); $adrax['tel'] = $ancien->Tel($i); $adrax['fax'] = $ancien->Fax($i); $userax['adr'][] = $adrax; @@ -145,12 +145,12 @@ function import_from_ax($userax, $nom_usage=false, $mobile=false, $del_address=n $new_adrid++; } - if ($adr['pays']) { + if ($adr['city']) { $res = $globals->xdb->query( "SELECT a2 FROM geoloc_pays WHERE pays LIKE {?} OR country LIKE {?}", - $adr['pays'], $adr['pays']); + $adr['country'], $adr['country']); $a2 = $res->fetchOneCell(); } @@ -160,15 +160,15 @@ function import_from_ax($userax, $nom_usage=false, $mobile=false, $del_address=n "INSERT INTO adresses SET uid = {?}, adrid = {?}, adr1 = {?}, adr2 = {?}, adr3 = {?}, - cp = {?}, ville = {?}, - pays = {?}, + postcode = {?}, city = {?}, + country = {?}, tel = {?}, fax = {?}, datemaj = NOW(), pub = 'ax', tel_pub = 'ax'", $userax['uid'], $new_adrid, $adr['adr1'], $adr['adr2'], $adr['adr3'], - $adr['cp'], $adr['ville'], + $adr['postcode'], $adr['city'], $a2, $adr['tel'], $adr['fax']); } @@ -198,11 +198,11 @@ function import_from_ax($userax, $nom_usage=false, $mobile=false, $del_address=n $new_entrid++; } - if ($pro['pays']) { + if ($pro['country']) { $res = $globals->xdb->query( "SELECT a2 FROM geoloc_pays WHERE pays LIKE {?} OR country LIKE {?}", - $pro['pays'], $pro['pays']); + $pro['country'], $pro['country']); $a2 = $res->fetchOneCell(); } if (!$a2) { $a2 = '00'; } @@ -212,14 +212,14 @@ function import_from_ax($userax, $nom_usage=false, $mobile=false, $del_address=n SET uid = {?}, entrid = {?}, entreprise = {?}, poste = {?}, adr1 = {?}, adr2 = {?}, adr3 = {?}, - cp = {?}, ville = {?}, - pays = {?}, + postcode = {?}, city = {?}, + country = {?}, tel = {?}, fax = {?}, pub = 'ax', adr_pub = 'ax', tel_pub = 'ax'", $userax['uid'], $new_entrid, $pro['entreprise'], $pro['fonction'], $pro['adr1'], $pro['adr2'], $pro['adr3'], - $pro['cp'], $pro['ville'], + $pro['postcode'], $pro['city'], $a2, $pro['tel'], $pro['fax']); } diff --git a/include/user.func.inc.php b/include/user.func.inc.php index a23ba67..60f2fb6 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -181,28 +181,28 @@ function &get_user_details($login, $from_uid = '') $uid = $user['user_id']; $sql = "SELECT e.entreprise, s.label as secteur , ss.label as sous_secteur , f.fonction_fr as fonction, - e.poste, e.adr1, e.adr2, e.adr3, e.cp, e.ville, + e.poste, e.adr1, e.adr2, e.adr3, e.postcode, e.city, gp.pays, gr.name AS region, e.tel, e.fax, e.mobile, e.entrid, e.pub, e.tel_pub, e.email, e.email_pub, e.web FROM entreprises AS e LEFT JOIN emploi_secteur AS s ON(e.secteur = s.id) LEFT JOIN emploi_ss_secteur AS ss ON(e.ss_secteur = ss.id AND e.secteur = ss.secteur) LEFT JOIN fonctions_def AS f ON(e.fonction = f.id) - LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.pays) - LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.pays and gr.region = e.region) + LEFT JOIN geoloc_pays AS gp ON (gp.a2 = e.country) + LEFT JOIN geoloc_region AS gr ON (gr.a2 = e.country and gr.region = e.region) WHERE e.uid = {?} ORDER BY e.entrid"; $res = $globals->xdb->query($sql, $uid); $user['adr_pro'] = $res->fetchAllAssoc(); - $sql = "SELECT a.adr1,a.adr2,a.adr3,a.cp,a.ville, + $sql = "SELECT a.adr1,a.adr2,a.adr3,a.postcode,a.city, gp.pays,gr.name AS region,a.tel,a.fax, FIND_IN_SET('active', a.statut) AS active, a.adrid, FIND_IN_SET('res-secondaire', a.statut) AS secondaire, a.pub, a.tel_pub FROM adresses AS a - LEFT JOIN geoloc_pays AS gp ON (gp.a2=a.pays) - LEFT JOIN geoloc_region AS gr ON (gr.a2=a.pays and gr.region=a.region) + LEFT JOIN geoloc_pays AS gp ON (gp.a2=a.country) + LEFT JOIN geoloc_region AS gr ON (gr.a2=a.country and gr.region=a.region) WHERE uid= {?} AND NOT FIND_IN_SET('pro',a.statut) ORDER BY NOT FIND_IN_SET('active',a.statut), FIND_IN_SET('temporaire',a.statut), FIND_IN_SET('res-secondaire',a.statut)"; $res = $globals->xdb->query($sql, $uid); diff --git a/include/webservices/manageurs.client.inc.php b/include/webservices/manageurs.client.inc.php index 3cbd977..559699a 100644 --- a/include/webservices/manageurs.client.inc.php +++ b/include/webservices/manageurs.client.inc.php @@ -10,7 +10,7 @@ function get_annuaire_infos($amicale, $id_assoce, $adresse){ $url = 'http://www.polytechniciens.org:80/manageurs.php'; //decommenter pour ajouter un webservice chez l'AX : - // return array('adresse' => array(0 => array('adr1' => 'test AX', 'ville' => 'Trou perdu'))); + // return array('adresse' => array(0 => array('adr1' => 'test AX', 'city' => 'Trou perdu'))); $client = new xmlrpc_client($url); diff --git a/include/webservices/manageurs.server.inc.php b/include/webservices/manageurs.server.inc.php index b8ae841..cd91bed 100644 --- a/include/webservices/manageurs.server.inc.php +++ b/include/webservices/manageurs.server.inc.php @@ -36,7 +36,7 @@ function get_annuaire_infos($method, $params) { $res = $globals->xdb->iterRow( "SELECT q.profile_mobile AS cell, a.naissance AS age, adr.adr1, adr.adr2, adr.adr3, - adr.cp, adr.ville, adr.pays, + adr.postcode, adr.city, adr.country, adr.tel, adr.fax FROM auth_user_md5 AS a INNER JOIN auth_user_quick AS q USING (user_id) @@ -51,8 +51,8 @@ function get_annuaire_infos($method, $params) { //traitement des adresss si necessaire if (isset($params[2])) { - if(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['cp'], $adr['ville'], - $adr['pays'], $adr['tel'], $adr['fax']) = $res->next()) + if(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['postcode'], $adr['city'], + $adr['country'], $adr['tel'], $adr['fax']) = $res->next()) { $array['cell'] = $cell; $array['age'] = $age; @@ -63,8 +63,8 @@ function get_annuaire_infos($method, $params) { if ($adresse != 1) { //on ne veut pas la premiere adresse $i = 2; - while(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['cp'], $adr['ville'], - $adr['pays'], $adr['tel'], $adr['fax']) = $res->next()) + while(list($cell, $age, $adr['adr1'], $adr['adr2'], $adr['adr3'], $adr['postcode'], $adr['city'], + $adr['country'], $adr['tel'], $adr['fax']) = $res->next()) { if($adresse == $i){//si on veut cette adresse en particulier $array['adresse'][0] = $adr; diff --git a/templates/admin/synchro_ax.tpl b/templates/admin/synchro_ax.tpl index b9175b2..f3bf34d 100644 --- a/templates/admin/synchro_ax.tpl +++ b/templates/admin/synchro_ax.tpl @@ -42,7 +42,7 @@
{if $x.profile_from_ax}
-Cet utilisateur a accpeté la synchronisation +Cet utilisateur a accepeté la synchronisation
{else}
diff --git a/templates/geoloc/address.tpl b/templates/geoloc/address.tpl index 8a66a12..3a1108f 100644 --- a/templates/geoloc/address.tpl +++ b/templates/geoloc/address.tpl @@ -21,11 +21,11 @@ {**************************************************************************} - {if $address.adr1 || $address.pays || $geoloc_address.ville || $address.tel || $address.fax || $address.mobile} + {if $address.adr1 || $address.pays || $geoloc_address.city || $address.tel || $address.fax || $address.mobile} {if $no_div neq 1}
{/if} - {if $titre && ($address.adr1 || $address.ville || $address.pays)} + {if $titre && ($address.adr1 || $address.city || $address.pays)} {if $titre_div}
{$titre} @@ -37,7 +37,7 @@ {if $address.adr1}{$address.adr1}
{/if} {if $address.adr2}{$address.adr2}
{/if} {if $address.adr3}{$address.adr3}
{/if} - {if $address.ville}{$address.cp} {$address.ville}
{/if} + {if $address.city}{$address.postcode} {$address.city}
{/if} {if $address.pays} {$address.pays}{if $address.region && $address.pays != 'France'} ({$address.region}){/if} {/if} diff --git a/templates/include/minifiche.tpl b/templates/include/minifiche.tpl index 6c225ee..7aea0b4 100644 --- a/templates/include/minifiche.tpl +++ b/templates/include/minifiche.tpl @@ -86,7 +86,7 @@
{if $c.wasinscrit} - {if $c.web || $c.mobile || $c.pays || $c.ville || $c.region || $c.entreprise || $c.freetext} + {if $c.web || $c.mobile || $c.pays || $c.city || $c.region || $c.entreprise || $c.freetext} {if $c.web} @@ -94,10 +94,10 @@ {/if} - {if $c.pays || $c.ville} + {if $c.pays || $c.city} - + {/if} {if $c.mobile} diff --git a/templates/profil/adresses.tpl b/templates/profil/adresses.tpl index c7312a7..abe777b 100644 --- a/templates/profil/adresses.tpl +++ b/templates/profil/adresses.tpl @@ -117,9 +117,9 @@ Code postal / Ville
@@ -127,8 +127,8 @@ Pays @@ -139,7 +139,7 @@ diff --git a/templates/profil/emploi.tpl b/templates/profil/emploi.tpl index 3cbba31..f86f55f 100644 --- a/templates/profil/emploi.tpl +++ b/templates/profil/emploi.tpl @@ -111,7 +111,7 @@ Code postal
@@ -119,7 +119,7 @@ Ville
@@ -127,8 +127,8 @@ Pays @@ -139,7 +139,7 @@ diff --git a/templates/search.adv.form.tpl b/templates/search.adv.form.tpl index 5ac1dc2..440032a 100644 --- a/templates/search.adv.form.tpl +++ b/templates/search.adv.form.tpl @@ -131,18 +131,18 @@ - + @@ -155,8 +155,8 @@ {else} {assign var="region" value=""} {/if} - {if $smarty.request.pays neq ""} - {geoloc_region pays=$smarty.request.pays region=$region} + {if $smarty.request.country neq ""} + {geoloc_region pays=$smarty.request.country region=$region} {else} {/if}
{$c.web}
Géographie:{$c.ville}{if $c.ville && $c.pays}, {/if}{$c.pays}{$c.city}{if $c.city && $c.pays}, {/if}{$c.pays}
- +   - +
- + {geoloc_pays pays=$adr.country}
- +
- +
- + {geoloc_pays pays=$countrypro.$i}
Ville
Pays - + {if $smarty.request.country} + {assign var="country" value=$smarty.request.country} {else} - {assign var="pays" value=""} + {assign var="country" value=""} {/if} - {geoloc_pays pays=$pays} + {geoloc_pays pays=$country}