* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: advanced_search.php,v 1.25 2004-11-04 13:50:44 x2000habouzit Exp $
+ $Id: advanced_search.php,v 1.26 2004-11-05 14:34:03 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$where = $fields->get_where_statement();
$sql = 'SELECT SQL_CALC_FOUND_ROWS
- DISTINCT u.matricule,u.matricule_ax,
+ DISTINCT u.matricule,u.matricule_ax,u.user_id,
perms!=\'non-inscrit\' AS inscrit,
u.nom,
u.prenom,
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: notifs.php,v 1.3 2004-11-05 13:49:15 x2000habouzit Exp $
+ $Id: notifs.php,v 1.4 2004-11-05 14:34:04 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$notifs->del_promo($val);
break;
+ case 'add_nonins':
+ $notifs->add_nonins($val);
+ break;
+
case 'del_nonins':
$notifs->del_nonins($val);
break;
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: search.php,v 1.45 2004-11-04 14:54:39 x2000habouzit Exp $
+ $Id: search.php,v 1.46 2004-11-05 14:34:03 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$offset = new NumericSField('offset');
$sql = 'SELECT SQL_CALC_FOUND_ROWS
- DISTINCT r.matricule,u.matricule_ax,
+ DISTINCT r.matricule,u.matricule_ax,u.user_id,
u.perms!="non-inscrit" AS inscrit,
UPPER(IF(u.nom!="",u.nom,u.nom_ini)) AS nom,
IF(u.prenom!="",u.prenom,u.prenom_ini) AS prenom,
u.promo AS promo,
a.alias AS forlife,
'.$globals->search_result_fields.'
- c.uid AS contact
+ c.uid AS contact,
+ w.arg AS watch
FROM auth_user_md5 AS r
LEFT JOIN auth_user_md5 AS u ON (u.matricule=r.matricule)
LEFT JOIN aliases AS a ON (u.user_id = a.id AND a.type="a_vie")
LEFT JOIN contacts AS c ON (c.uid='.((array_key_exists('uid',$_SESSION))?$_SESSION['uid']:0).' AND c.contact=u.user_id)
+ LEFT JOIN watch AS w ON (w.arg=u.user_id AND w.user_id='.((array_key_exists('uid',$_SESSION))?$_SESSION['uid']:0).' AND w.type="non-inscrit")
'.$globals->search_result_where_statement.'
WHERE '.$fields->get_where_statement().'
ORDER BY '.(logged() && !empty($_REQUEST['mod_date_sort']) ? 'date DESC,' :'')
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: notifs.inc.php,v 1.4 2004-11-05 13:49:16 x2000habouzit Exp $
+ $Id: notifs.inc.php,v 1.5 2004-11-05 14:34:04 x2000habouzit Exp $
***************************************************************************/
require_once('diogenes.flagset.inc.php');
$globals->db->query("DELETE FROM watch WHERE user_id='{$this->uid}' AND type='non-inscrit' AND arg='$p'");
}
+ function add_nonins($p) {
+ global $globals;
+ $globals->db->query("INSERT INTO watch (user_id,type,arg) VALUES('{$this->uid}','non-inscrit','$p')");
+ $res = $globals->db->query(" SELECT prenom,nom,promo,user_id FROM auth_user_md5 WHERE user_id='$p'");
+ $this->nonins[$p] = mysql_fetch_assoc($res);
+ mysql_free_result($res);
+ }
+
function del_promo($p) {
global $globals;
unset($this->promos[$p]);
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: notifs.tpl,v 1.6 2004-11-05 13:49:16 x2000habouzit Exp $
+ $Id: notifs.tpl,v 1.7 2004-11-05 14:34:05 x2000habouzit Exp $
***************************************************************************}
{dynamic}
<p>
Si un non-inscrit que tu surveille s'inscrit, il sera automatiquement ajouté à tes contacts.
</p>
-<!--
-<form action="{$smarty.server.PHP_SELF}" method="post">
- <fieldset>
- <legend>Ajouter un non-inscrit</legend>
- <input type='text' name='' />
- <input type='submit' value='ajouter' />
- <span class='smaller'>Il faut entrer le "login" (prenom.nom ou prenom.nom.promo).</span>
- </fieldset>
-</form>
--->
+
+<p>
+Pour surveiller des membres non-inscrits, il faut passer par la <a href="{"search.php"|url}" onclick='return popup(this)'>recherche</a>
+et cliquer sur les icones <img src="{"images/ajouter.gif"|url}" alt="Ajouter" /> pour les ajouter à cette liste
+</p>
+
<table class='tinybicol' cellpadding="0" cellspacing="0">
<tr>
<td>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: minifiche.tpl,v 1.10 2004-10-30 09:09:07 x2000bedo Exp $
+ $Id: minifiche.tpl,v 1.11 2004-11-05 14:34:05 x2000habouzit Exp $
***************************************************************************}
{/if}
{/min_auth}
</div>
+ {if $inscrit || $c.dcd}
<div class="appli">
{strip}
{if $c.iso3166}
{if $c.dcd} décédé le {$c.deces}{/if}
{/strip}
</div>
+ {/if}
{min_auth level="cookie"}
{include file="include/minifiche_pvt.tpl"}
{/min_auth}
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: minifiche_pvt.tpl,v 1.11 2004-11-04 15:33:29 x2000habouzit Exp $
+ $Id: minifiche_pvt.tpl,v 1.12 2004-11-05 14:34:05 x2000habouzit Exp $
***************************************************************************}
-{if $inscrit==1}
+{if !$inscrit}
+ {if !$c.dcd}
+ <div class="appli">
+ <a href="javascript:x()" onclick="popWin('marketing/public.php?num={$c.matricule}')">
+ clique ici si tu connais son adresse email !
+ </a>
+ </div>
+ <div class='bits'>
+ {if $show_action eq ajouter}
+ <a href="{"carnet/notifs.php"|url}?add_nonins={$c.user_id}">{*
+ *}<img src="{"images"|url}/ajouter.gif" alt="Ajouter à la liste de mes surveillances" title="Ajouter à la liste de mes surveillances" />{*
+ *}</a>
+ {else}
+ <a href="{"carnet/notifs.php"|url}?del_nonins={$c.user_id}">{*
+ *}<img src="{"images"|url}/retirer.gif" alt="Retirer de la liste de mes surveillances" title="Retirer de la liste de mes surveillances" />{*
+ *}</a>
+ {/if}
+ {perms level='admin'}
+ <a href="javascript:x()" onclick="popWin('http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$c.matricule_ax}')">{*
+ *}<img src="{"images/ax.png"|url}" alt='AX' title="fiche AX" />{*
+ *}</a>
+ {/perms}
+ </div>
+ {/if}
+ <div class="long"></div>
+{else}
<div class="bits">
<a href="javascript:x()"
onclick="popupWin('fiche.php?user={$c.forlife}','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500')">{*
{/perms}
{/if}
</div>
-{else}
- {if $c.dcd neq 1}
- <div>
- <a href="javascript:x()" onclick="popWin('marketing/public.php?num={$c.matricule}')">
- clique ici si tu connais son adresse email !
- </a>
- {perms level='admin'}
-
- <a href="javascript:x()" onclick="popWin('http://www.polytechniciens.com/index.php?page=AX_FICHE_ANCIEN&anc_id={$c.matricule_ax}')">{*
- *}<img src="{"images/ax.png"|url}" alt='AX' title="fiche AX" />{*
- *}</a>
- {/perms}
- </div>
- {/if}
- <div class="long"></div>
-{/if}
-{if $inscrit==1}
<div class="long">
{if $c.web || $c.mobile || $c.pays || $c.ville || $c.region || $c.entreprise || $c.libre}
<table cellspacing="0" cellpadding="0">
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: search.tpl,v 1.24 2004-11-04 13:50:45 x2000habouzit Exp $
+ $Id: search.tpl,v 1.25 2004-11-05 14:34:04 x2000habouzit Exp $
***************************************************************************}
{dynamic}
<div class="contact-list" style="clear:both">
{section name=resultat loop=$resultats}
{if !$resultats[resultat].inscrit || $resultats[resultat].decede}<div class='grayed'>{/if}
- {if $resultats[resultat].contact!=""}
+ {if $resultats[resultat].contact || $resultats[resultat].watch}
{assign var="show_action" value="retirer"}
{else}
{assign var="show_action" value="ajouter"}