From: x2000habouzit Date: Tue, 31 Aug 2004 21:39:00 +0000 (+0000) Subject: more simplifications, and less echoes X-Git-Tag: xorg/old~1641 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=15d3cab78bc5db75aa73463f2e7362e08f37cf3a;p=platal.git more simplifications, and less echoes --- diff --git a/htdocs/profil.php b/htdocs/profil.php index ba44514..b443773 100644 --- a/htdocs/profil.php +++ b/htdocs/profil.php @@ -18,14 +18,14 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: profil.php,v 1.8 2004-08-31 16:04:11 x2000habouzit Exp $ + $Id: profil.php,v 1.9 2004-08-31 21:39:00 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); new_skinned_page('profil.tpl',AUTH_MDP, true, 'profil.head.tpl'); -//on charge les fonctions -require_once('profil.inc.php'); +require_once('tabs.inc.php'); +require_once('profil.func.inc.php'); //on met a jour $opened_tab et $new_tab qui sont le tab du POST et le tab demande // Tout d'abord, quel est le tab actuel ? diff --git a/include/profil.inc.php b/include/profil.inc.php deleted file mode 100644 index 9ab46ec..0000000 --- a/include/profil.inc.php +++ /dev/null @@ -1,31 +0,0 @@ -register_function('draw_onglets','draw_all_tabs'); - -?> diff --git a/include/tabs.inc.php b/include/tabs.inc.php index c460b95..9d20f0e 100644 --- a/include/tabs.inc.php +++ b/include/tabs.inc.php @@ -18,16 +18,16 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: tabs.inc.php,v 1.5 2004-08-31 19:48:46 x2000habouzit Exp $ + $Id: tabs.inc.php,v 1.6 2004-08-31 21:39:01 x2000habouzit Exp $ ***************************************************************************/ $tabname_array = Array( - "general" => "Informations
générales", - "adresses" => "Adresses
personnelles", - "poly" => "Informations
polytechniciennes", - "emploi" => "Informations
professionnelles", - "skill" => "Compétences
diverses", + "general" => "Informations\ngénérales", + "adresses" => "Adresses\npersonnelles", + "poly" => "Informations\npolytechniciennes", + "emploi" => "Informations\nprofessionnelles", + "skill" => "Compétences\ndiverses", "mentor" => "Mentoring" ); @@ -61,39 +61,4 @@ function get_next_tab($tabname){ return key($tabname_array); } -function draw_all_tabs(){ - global $tabname_array, $new_tab; - reset($tabname_array); -?> - - -
  • - -
  • - -
  • - "> - - -
  • - diff --git a/templates/profil.tpl b/templates/profil.tpl index e64ab95..1603ca4 100644 --- a/templates/profil.tpl +++ b/templates/profil.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: profil.tpl,v 1.9 2004-08-31 15:03:33 x2000habouzit Exp $ + $Id: profil.tpl,v 1.10 2004-08-31 21:39:01 x2000habouzit Exp $ ***************************************************************************} @@ -38,7 +38,15 @@
    - {draw_onglets} +
      + {foreach from=$onglets key=o item=i} + {if $o eq $onglet} +
    • {$i|nl2br}
    • + {else} +
    • {$i|nl2br}
    • + {/if} + {/foreach} +