git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-695
$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);
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)
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;
$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'] = '';
$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'] = '';
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]);
//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());
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');
$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);
$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);
}
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;
}
$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)
$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);
$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'] == '')
);
}
"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)
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';
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));
$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();
}
$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] = '';
adr1 = {?},
adr2 = {?},
adr3 = {?},
- cp = {?},
- ville = {?},
- pays = {?},
+ postcode = {?},
+ city = {?},
+ country = {?},
region = {?},
tel = {?},
fax = {?},
$adr['adr1'],
$adr['adr2'],
$adr['adr3'],
- $adr['cp'],
- $adr['ville'],
- $adr['pays'],
+ $adr['postcode'],
+ $adr['city'],
+ $adr['country'],
$adr['region'],
$adr['tel'],
$adr['fax'],
adr1 = {?},
adr2 = {?},
adr3 = {?},
- cp = {?},
- ville = {?},
- pays = {?},
+ postcode = {?},
+ city = {?},
+ country = {?},
region = {?},
tel = {?},
fax = {?},
$adr['adr1'],
$adr['adr2'],
$adr['adr3'],
- $adr['cp'],
- $adr['ville'],
- $adr['pays'],
+ $adr['postcode'],
+ $adr['city'],
+ $adr['country'],
$adr['region'],
$adr['tel'],
$adr['fax'],
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 ({?}, {?}, {?}, ".
"{?},".
"{?}".
( ($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]);
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);
{
$str_error = $str_error."Le champ '$description - Ligne 3' contient un caractère interdit.<BR />";
}
- 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.<BR />";
}
- 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.<BR />";
}
$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'] = '';
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);
{
$str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 3' contient un caractère interdit.<BR />";
}
- 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.<BR />";
}
- 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.<BR />";
}
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,";
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()
$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);
$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;
$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();
}
"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']);
}
$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'; }
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']);
}
$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);
$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);
$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)
//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;
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;
<form action='{$smarty.request.PHP_SELF}' method='post'>
{if $x.profile_from_ax}
<div style="text-align:center;margin:5px;background:green">
-<strong>Cet utilisateur a accpeté la synchronisation</strong>
+<strong>Cet utilisateur a accepeté la synchronisation</strong>
</div>
{else}
<div style="text-align:center;margin:5px;background:red">
{**************************************************************************}
- {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}
<div class="adresse">
{/if}
- {if $titre && ($address.adr1 || $address.ville || $address.pays)}
+ {if $titre && ($address.adr1 || $address.city || $address.pays)}
{if $titre_div}
<div class="titre">
{$titre}
{if $address.adr1}<strong>{$address.adr1}</strong><br />{/if}
{if $address.adr2}<strong>{$address.adr2}</strong><br />{/if}
{if $address.adr3}<strong>{$address.adr3}</strong><br />{/if}
- {if $address.ville}<strong>{$address.cp} {$address.ville}</strong><br />{/if}
+ {if $address.city}<strong>{$address.postcode} {$address.city}</strong><br />{/if}
{if $address.pays}
<strong>{$address.pays}{if $address.region && $address.pays != 'France'} ({$address.region}){/if}</strong>
{/if}
<div class="long">
{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}
<table cellspacing="0" cellpadding="0">
{if $c.web}
<tr>
<td class="rt"><a href="{$c.web}">{$c.web}</a></td>
</tr>
{/if}
- {if $c.pays || $c.ville}
+ {if $c.pays || $c.city}
<tr>
<td class="lt">Géographie:</td>
- <td class="rt">{$c.ville}{if $c.ville && $c.pays}, {/if}{$c.pays}</td>
+ <td class="rt">{$c.city}{if $c.city && $c.pays}, {/if}{$c.pays}</td>
</tr>
{/if}
{if $c.mobile}
<span class="titre">Code postal / Ville</span><br />
</td>
<td class="cold">
- <input type="text" name="cp[{$adrid}]" value="{$adr.cp}" size="7" maxlength="18" />
+ <input type="text" name="postcode[{$adrid}]" value="{$adr.postcode}" size="7" maxlength="18" />
- <input type="text" name="ville[{$adrid}]" value="{$adr.ville}" size="32" maxlength="78" />
+ <input type="text" name="city[{$adrid}]" value="{$adr.city}" size="32" maxlength="78" />
</td>
</tr>
<tr>
<span class="titre">Pays</span>
</td>
<td class="cold">
- <select name="pays[{$adrid}]" onchange="this.form.submit();">
- {geoloc_pays pays=$adr.pays}
+ <select name="country[{$adrid}]" onchange="this.form.submit();">
+ {geoloc_pays pays=$adr.country}
</select>
</td>
</tr>
</td>
<td class="cold">
<select name="region[{$adrid}]">
- {geoloc_region pays=$adr.pays region=$adr.region}
+ {geoloc_region pays=$adr.country region=$adr.region}
</select>
</td>
</tr>
<span class="titre">Code postal</span><br />
</td>
<td class="cold">
- <input type="text" name="cppro[{$i}]" value="{$cppro.$i}" size="8" maxlength="8" />
+ <input type="text" name="postcodepro[{$i}]" value="{$postcodepro.$i}" size="8" maxlength="8" />
</td>
</tr>
<tr>
<span class="titre">Ville</span><br />
</td>
<td class="cold">
- <input type="text" name="villepro[{$i}]" value="{$villepro.$i}" size="40" maxlength="50" />
+ <input type="text" name="citypro[{$i}]" value="{$citypro.$i}" size="40" maxlength="50" />
</td>
</tr>
<tr>
<span class="titre">Pays</span>
</td>
<td class="cold">
- <select name="payspro[{$i}]" onchange="this.form.submit();">
- {geoloc_pays pays=$payspro.$i}
+ <select name="countrypro[{$i}]" onchange="this.form.submit();">
+ {geoloc_pays pays=$countrypro.$i}
</select>
</td>
</tr>
</td>
<td class="cold">
<select name="regionpro[{$i}]">
- {geoloc_region pays=$payspro.$i region=$regionpro.$i}
+ {geoloc_region pays=$countrypro.$i region=$regionpro.$i}
</select>
</td>
</tr>
</tr>
<tr>
<td>Ville</td>
- <td><input type="text" name="ville" size="32" value="{$smarty.request.ville}" /></td>
+ <td><input type="text" name="city" size="32" value="{$smarty.request.city}" /></td>
</tr>
<tr>
<td>Pays</td>
<td>
- <select name="pays" onchange="javascript:document.forms.recherche.submit();">
- {if $smarty.request.pays}
- {assign var="pays" value=$smarty.request.pays}
+ <select name="coutry" onchange="javascript:document.forms.recherche.submit();">
+ {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}
</select>
</td>
</tr>
{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}
<option value=""></option>
{/if}