fix ugly profile hack
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 24 Jul 2006 06:17:50 +0000 (06:17 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 24 Jul 2006 06:17:50 +0000 (06:17 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@620 839d8a87-29fc-0310-9880-83ba4fa771e5

include/profil/assign_adresses.inc.php
include/profil/get_adresses.inc.php
include/profil/update_adresses.inc.php
include/profil/verif_adresses.inc.php
templates/profil/adresses.tpl

index 6bdc2a4..9a9912e 100644 (file)
@@ -18,6 +18,9 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
+
+global $adresses;
+
 //on génère une éventuelle nouvelle adresse
 if (!isset($adresses) || (count($adresses) < $nb_adr_max)){
   $adrid = generate_new_adrid();
index 928e4e7..d31c651 100644 (file)
@@ -21,6 +21,8 @@
 
 require_once('geoloc.inc.php');
 
+global $adresses;
+
 // on limite à 6 adresses personnelles par utilisateur
 $nb_adr_max = 6; // ( = max(adrid possibles)
 // on limite à 4 numéros de téléphone par adresse
index 49c09ba..79bbab7 100644 (file)
@@ -19,6 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
+global $adresses;
 reset($adresses);
 
 function insert_new_tel($adrid, $tel) {
index 6c4495d..fbf0049 100644 (file)
@@ -19,6 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
+global $adresses;
 
 function generate_new_adrid(){
   global $adresses;
index 63f4e27..666e97e 100644 (file)
       </td>
     </tr>
     {foreach from=$adr.tels item="tel"}
-      <tr class="flags">
-        <td class="colg">
-          <input type="hidden" name="telid{$tel.telid}[{$adrid}]" value="{$tel.telid}"/>
-          {if $tel.new_tel}
-            <input type="hidden" name="new_tel{$tel.telid}[{$adrid}]" value="1"/>
-          {/if}
-          <span class="titre" onclick="this.style.display='none';var d = document.getElementById('tel_type{$adrid}_{$tel.telid}');d.style.display='inline';d.select();d.focus();">{$tel.tel_type}&nbsp;:</span>
-          <input id="tel_type{$adrid}_{$tel.telid}" style="display:none" type="text" size="5" maxlength="20" name="tel_type{$tel.telid}[{$adrid}]" value="{$tel.tel_type}"/>
-        </td>
-        <td>
-          <input type="text" size="19" maxlength="28" name="tel{$tel.telid}[{$adrid}]" value="{$tel.tel}" />
-        </td>
-          {include file="include/flags.radio.tpl" name="tel_pub`$tel.telid`[$adrid]" val=$tel.tel_pub display="mini"}
-      </tr>        
+    <tr class="flags">
+      <td class="colg">
+        <input type="hidden" name="telid{$tel.telid}[{$adrid}]" value="{$tel.telid}"/>
+        {if $tel.new_tel}
+          <input type="hidden" name="new_tel{$tel.telid}[{$adrid}]" value="1"/>
+        {/if}
+        <span class="titre" onclick="this.style.display='none';var d = document.getElementById('tel_type{$adrid}_{$tel.telid}');d.style.display='inline';d.select();d.focus();">{$tel.tel_type}&nbsp;:</span>
+        <input id="tel_type{$adrid}_{$tel.telid}" style="display:none" type="text" size="5" maxlength="20" name="tel_type{$tel.telid}[{$adrid}]" value="{$tel.tel_type}"/>
+      </td>
+      <td>
+        <input type="text" size="19" maxlength="28" name="tel{$tel.telid}[{$adrid}]" value="{$tel.tel}" />
+      </td>
+      {include file="include/flags.radio.tpl" name="tel_pub`$tel.telid`[$adrid]" val=$tel.tel_pub display="mini"}
+    </tr>
     {/foreach}
     <tr><td colspan="5">&nbsp;</td></tr>
     {/section}