utilisation de popwin et correction des liens dans profil et referent
authorx2000coic <x2000coic>
Sat, 7 Aug 2004 11:26:43 +0000 (11:26 +0000)
committerx2000coic <x2000coic>
Sat, 7 Aug 2004 11:26:43 +0000 (11:26 +0000)
ajout du wite web et de la formation dans la fiche

htdocs/fiche.php
htdocs/fiche_referent.php
htdocs/profil.php
htdocs/referent.php
templates/fiche.tpl
templates/profil.tpl
templates/profil/general.tpl
templates/referent.tpl

index f2afb55..2987485 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 require("auto.prepend.inc.php");
-new_simple_page('fiche.tpl',AUTH_COOKIE, false, 'add_fiche_css.tpl');
+new_simple_page('fiche.tpl',AUTH_COOKIE, true, 'add_fiche_css.tpl');
 
 require_once('applis.func.inc.php');
 
@@ -74,7 +74,7 @@ $page->assign('is_contact', $is_contact);
 // photo
 
 $photo="getphoto.php?x=".$user_id.(SID == '' ? '' : '&amp;'.SID).($new ? '&amp;modif=new' : '');
-if(!isset($size_y) and !isset($size_x)) list($size_x, $size_y) = getimagesize("none.png");
+if(!isset($size_y) and !isset($size_x)) list($size_x, $size_y) = getimagesize("images/none.png");
 if(!isset($size_y) or $size_y < 1) $size_y=1;
 if(!isset($size_x) or $size_x < 1) $size_x=1;
 if($size_y > 300){
index 4e4946c..643f881 100644 (file)
@@ -99,11 +99,12 @@ $result = mysql_query("SELECT gp.pays
                        WHERE uid = $user_id");
 $nb_pays = mysql_num_rows($result);
 $i = 1;
-while(list($pays[$i]) = mysql_fetch_row($result))
+while(list($pays[$i]) = mysql_fetch_row($result)){
   $i++;
+}
 unset($pays[$i]);
 mysql_free_result($result);
-$page->assign('nb_pays', $nb_secteurs);
+$page->assign('nb_pays', $nb_pays);
 $page->assign_by_ref('pays', $pays);
 
 $page->run();
index e47bb1a..2aadc82 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 require("auto.prepend.inc.php");
-new_skinned_page('profil.tpl',AUTH_COOKIE);
+new_skinned_page('profil.tpl',AUTH_COOKIE, true);
 
 if ($no_update_bd) {
     $_REQUEST = array();
index f577728..01bfc0c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 require("auto.prepend.inc.php");
-new_skinned_page('referent.tpl',AUTH_COOKIE);
+new_skinned_page('referent.tpl',AUTH_COOKIE, true);
 
 $nb_max_resultats_total = 100;
 $nb_max_resultats_par_page = 10;
@@ -98,7 +98,7 @@ if(isset($_REQUEST['Chercher'])){
  
     $sql = "SELECT $champ_select $clause_from $clause_where
             GROUP BY uid ORDER BY RAND({$_SESSION['uid']})";
-    echo "requete : ".htmlentities($sql)."<br />";
+    //echo "requete : ".htmlentities($sql)."<br />";
     $res = mysql_query($sql);
     //  echo mysql_error()."<br/>";
     if(mysql_num_rows($res) == 0){
index d7afff5..846ffa7 100644 (file)
@@ -1,9 +1,9 @@
 {dynamic}
 <div class="boite">
-  <div class="item" style="text-align:center;padding-left: 20px;padding-right: 20px;">
+  <div class="item" style="text-align:center;padding-left: 20px;padding-right: 20px; max-width: 250px;">
   <strong>{$prenom|htmlentities} {$nom|htmlentities}</strong><br />
-  <span>X {$promo|htmlentities}</span><br />
-  <span>Fiche mise à jour le {$date|date_format:"%d/%m/%Y"}</span><br />
+  <span>X {$promo|htmlentities}&nbsp;-&nbsp;{$applis}</span><br />
+  <span style="font-size: small;">(Fiche mise à jour le {$date|date_format:"%d/%m/%Y"})</span><br />
   <span><a href="vcard.php/{$username}.vcf?x={$username}"><img src="images/vcard.png" alt="Afficher la carte de visite" /></a>&nbsp;
   {if !$is_contact}
   <a href="javascript:x()"  onclick="popWin('mescontacts.php?action=ajouter&amp;user={$username}')"><img src="images/ajouter.gif" alt="Ajouter parmi mes contacts" /></a>&nbsp;
@@ -12,8 +12,9 @@
   <a href="mailto:{$username}@polytechnique.org">{$username}@polytechnique.org</a><br />
   <span><em>Section</em> : {$section|htmlentities}</span><br />
   <span><em>Binet(s)</em> : {$binets|htmlentities}</span><br />
-  <span><em>Groupe(s) X</em> : {$groupes|htmlentities}</span><br />
+  <span><em>Groupe(s) X</em> : {$groupes}</span><br />
   {if $mobile}<br /><span><em>Mobile</em> : {$mobile|htmlentities}</span><br />{/if}
+  {if $web}<br /><span><em>Site Web</em> :</span><br /><span><a target="_blank" href="{$web|htmlentities}">{$web|htmlentities}</a></span><br />{/if}
   {if $libre}<br /><span><em>Commentaires</em> :</span><br /><span>{$libre|htmlentities|nl2br}</span>{/if}
   </div>
   <div class="item">
index 062aff7..ad241ed 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: profil.tpl,v 1.3 2004-07-24 18:22:43 x2000habouzit Exp $ *}
+{* $Id: profil.tpl,v 1.4 2004-08-07 11:26:45 x2000coic Exp $ *}
 
 {config_load file="profil.conf"}
 {literal}
@@ -36,6 +36,8 @@
 <div class="erreur">
   {$profil_error}
 </div>
+{else}
+<p>Tu peux consulter <a href="javascript:x()" onclick="popWin('fiche.php?user={$smarty.session.username}','_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=370')">l'état actuel de ta fiche</a> tel qu'elle apparaîtra pour un camarade.</p>
 {/if}
 {* dessin des onglets *}
 
index 26a4d42..6ce4d22 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: general.tpl,v 1.3 2004-07-17 12:20:23 x2000habouzit Exp $ *}
+{* $Id: general.tpl,v 1.4 2004-08-07 11:26:47 x2000coic Exp $ *}
 
 {include file="applis.js.tpl"}
 <div class="blocunite_tab">
               Voilà la photo qui apparaîtra sur la fiche de ton profil (si tu viens
               de changer ta photo, la photo affichée peut correspondre à ton ancien
               profil : c'est le cas si elle n'a pas encore été validée par un administrateur du site !
-              <a href="javascript:x()" onclick="popWin('x.php?x={$smarty.session.username}&amp;modif=new','_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=370')">nouvelle photo</a>).
+              <a href="javascript:x()" onclick="popWin('fiche.php?user={$smarty.session.username}&amp;modif=new','_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=370')">nouvelle photo</a>).
             </td>
             <td class="dcolg">
               <img src="getphoto.php?x={$smarty.session.uid}{*{if $smarty.cookies|@count == 0}&amp;{php}echo SID;{/php}{/if}*}" alt=" [ PHOTO ] ">
index b88b120..8f7e8ad 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: referent.tpl,v 1.2 2004-07-17 11:23:09 x2000habouzit Exp $ *}
+{* $Id: referent.tpl,v 1.3 2004-08-07 11:26:45 x2000coic Exp $ *}
 
 {literal}
 <script language="JavaScript" type="text/javascript">
@@ -40,10 +40,10 @@ d'
         <span class="rechdiplo">X{$personnes[resultat].promo}</span>
       </td>
       <td class="rechdetails" style="width:15%">
-        <a style="font-size: smaller;" href="javascript:x()"  onclick="popWin('x.php?x={$personnes[resultat].username}')">voir sa fiche</a>
+        <a style="font-size: smaller;" href="javascript:x()"  onclick="popWin('fiche.php?user={$personnes[resultat].username}')">voir sa fiche</a>
       </td>
       <td class="rechdetails" style="width:25%">
-        <a class="smaller" href="javascript:x()"  onclick="popWin('fiche_referent.php?x={$personnes[resultat].username}')">voir sa fiche référent</a>
+        <a class="smaller" href="javascript:x()"  onclick="popWin('fiche_referent.php?user={$personnes[resultat].username}')">voir sa fiche référent</a>
       </td>
     </tr>
     <tr>