From: x2000habouzit Date: Tue, 2 Nov 2004 06:46:48 +0000 (+0000) Subject: closes FS#176 X-Git-Tag: xorg/old~1104 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=aa78d5aecbc568189b65f80adf70e07c63e812cb;p=platal.git closes FS#176 --- diff --git a/htdocs/listes/trombi.php b/htdocs/listes/trombi.php index 5aaa120..34f5e18 100644 --- a/htdocs/listes/trombi.php +++ b/htdocs/listes/trombi.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombi.php,v 1.10 2004-10-31 14:42:36 x2000habouzit Exp $ + $Id: trombi.php,v 1.11 2004-11-02 06:46:49 x2000habouzit Exp $ ***************************************************************************/ if(empty($_REQUEST['liste'])) header('Location: index.php'); @@ -76,6 +76,7 @@ if(is_array($owners)) { $page->assign_by_ref('owners', $moderos); $trombi = new Trombi('getList'); + $trombi->showPromo(); $page->assign_by_ref('trombi',$trombi); } else $page->assign('no_list',true); diff --git a/htdocs/mescontacts.php b/htdocs/mescontacts.php index 9490f5b..e6fe45c 100644 --- a/htdocs/mescontacts.php +++ b/htdocs/mescontacts.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: mescontacts.php,v 1.23 2004-10-31 17:40:01 x2000chevalier Exp $ + $Id: mescontacts.php,v 1.24 2004-11-02 06:46:48 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -82,6 +82,7 @@ if(isset($_GET['trombi'])) { $trombi = new Trombi('getList'); $trombi->setNbRows(4); + $trombi->showPromo(); $page->assign_by_ref('trombi',$trombi); } else { $sql = "SELECT contact AS id, diff --git a/include/trombi.inc.php b/include/trombi.inc.php index a225416..5290c33 100644 --- a/include/trombi.inc.php +++ b/include/trombi.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombi.inc.php,v 1.2 2004-10-29 01:51:32 x2000habouzit Exp $ + $Id: trombi.inc.php,v 1.3 2004-11-02 06:46:49 x2000habouzit Exp $ ***************************************************************************/ require_once('xorg.plugin.inc.php'); @@ -27,9 +27,11 @@ class Trombi extends XOrgPlugin { var $_get_vars = Array('offset'); var $limit = 24; var $admin = false; + var $showpromo = false; function setNbRows($row) { $this->limit = $row*3; } function setAdmin() { $this->admin = true; } + function showPromo() { $this->showpromo = true; } function show() { /* this point is nasty... but since show() is called from the template ... @@ -52,6 +54,7 @@ class Trombi extends XOrgPlugin { $links[] = Array ('u' => $this->make_url($offset+1), 'i' => $offset+1, 'text' => 'suivant'); } + $page->assign_by_ref('trombi_show_promo', $this->showpromo); $page->assign_by_ref('trombi_list', $list); $page->assign_by_ref('trombi_links', $links); $page->assign('trombi_admin', $this->admin); diff --git a/templates/include/trombi.tpl b/templates/include/trombi.tpl index 74f5987..d07978f 100644 --- a/templates/include/trombi.tpl +++ b/templates/include/trombi.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: trombi.tpl,v 1.3 2004-10-29 02:16:43 x2000habouzit Exp $ + $Id: trombi.tpl,v 1.4 2004-11-02 06:46:50 x2000habouzit Exp $ ***************************************************************************} {dynamic} @@ -39,7 +39,7 @@ {/if}
- {$p.prenom} {$p.nom} ({$p.promo}) + {$p.prenom} {$p.nom}{if $trombi_show_promo}({$p.promo}){/if} {if $loop eq "3"}